Seite 1 von 1
Most important
Verfasst: Sa 11. Aug 2007, 06:49
von Piyush
I want to create one application in which when i will get call then this calling number will autometicaly save into outlook or access database.
Plz help me. or give me solution how can i usu your dll's.
Verfasst: Sa 11. Aug 2007, 08:57
von FJ
You don't have to use any dll. MyPhoneExplorer informs you about new things with an EventHandler. Please read the FAQ
Verfasst: Sa 11. Aug 2007, 14:18
von FJ
Sorry, i didn't know that its not in the english FAQ. If you make new entrys in the general.ini-file of MyPhoneExplorer it will run a script/exe/whatever. The data will be transfered throught the commandline-interface. You'll find the file general.ini in the database-folder of MyPhoneExplorer
Sample:
Code: Alles auswählen
[EventHandlers]
OnMissedCall=C:\Test.exe missednumber="%number"
Other Handlers are:
OnAcceptedCall (%number|%user)
OnOutgoingCall (%number|%user)
OnIncomingCall (%number|%user)
OnAutomaticConnect (%user)
OnManualConnect (%user)
OnIncomingMessage (%number|%text|%pdu|%user)
Verfasst: Sa 13. Okt 2007, 22:59
von Petar
I want to send received message's to a internet website through the URL.
Iv'e treid it with the following entry in general.ini:
Code: Alles auswählen
[EventHandlers]
OnIncomingMessage=http://mywebsite.com/gateway.php?text="%text"&phone="%user"
In that PHP script I've made the action that a email must be send to me, but I don't receive anything.
Can you explain how I could use the Eventhandler to do this?
Verfasst: So 14. Okt 2007, 16:00
von FJ
The Handler does not connect to the web. It starts a local srcipt or executable. Write a script which connects to your server and it will work.
Verfasst: So 14. Okt 2007, 20:35
von Petar
Thnx for the reply... Then iI must code some script on my localmachine.
Verfasst: Mo 15. Okt 2007, 08:21
von crea-doo
Petar hat geschrieben:Thnx for the reply... Then iI must code some script on my localmachine.
No, if you use for example
cUrl you dont have to write a local script.
So if you use:
Code: Alles auswählen
[EventHandlers]
OnIncomingMessage=C:\path\to\curl\curl.exe -s "http://mywebsite.com/gateway.php?text="%text"&phone="%user""
your script should work...
If you want to use other commandline options of cUrl, type "curl -h" in your command promt...
EDIT: If you have troubles with special chars, its really better to use a script
Code: Alles auswählen
For i = 0 to (WScript.Arguments.Count - 1)
sCommand = WScript.Arguments(i)
sCommand = URLPathEncode(sCommand)
sCommands = sCommands & sCommand & " "
Next
sCommands = Trim(sCommands)
set fs = CreateObject("Scripting.FilesystemObject")
sScriptName = Wscript.ScriptFullName
sScriptPath = fs.getparentfoldername(sScriptName)
Set objShell = CreateObject("WScript.Shell")
objShell.Run sScriptPath & "curl.exe -o ""C:\test.txt"" -s """ & sCommands & """", 0, True
Function URLPathEncode(Text)
sTemp = Text
For i = Len(Text) To 1 Step -1
Char = Asc(Mid(Text, i, 1))
If (Char >= 97 And Char <= 122) Or (Char >= 48 And Char <= 57) Or (Char >= 65 And Char <= 90) Or (Char >= 45 And Char <= 47) Then
'
ElseIf (Char = 95) Or (Char = 126) Or (Char = 38) Or (Char = 58) Or (Char = 61) Or (Char = 63) Or (Char = 64) Or (Char = 35) Or (Char = 33) Or (Char = 36) Or (Char = 42) Or (Char = 43) Then
'
Else
sTemp = Left(Text, i - 1) & ("%" & Hex(Char)) & Mid(sTemp, i + 1)
End If
Next
URLPathEncode = sTemp
End Function
To start this script:
Code: Alles auswählen
[EventHandlers]
OnIncomingMessage=C:\path\to\script\curl.vbs "http://mywebsite.com/gateway.php?text=%text&phone=%user"
Note: the file "curl.exe" has to be in the same folder as the "curl.vbs"
That worked perfect for me...