[Request] Simple Script to send message to PHP Script - Printable Version -Shoutbox (https://shoutbox.menthix.net) +-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58) +--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4) +---- Forum: Scripting (/forumdisplay.php?fid=39) +----- Thread: [Request] Simple Script to send message to PHP Script (/showthread.php?tid=82157) [Request] Simple Script to send message to PHP Script by Dempsey on 03-06-2008 at 03:40 PM
Can someone make me a simple script called AwaySMS which when my status is set to away, it will use xmlhttp to send incoming messages to a php script, which I will then use to SMS me the message? RE: [Request] Simple Script to send message to PHP Script by vikke on 03-06-2008 at 04:58 PM
Sorry, but I think this should work (not tested, I'm on Linux). code: RE: [Request] Simple Script to send message to PHP Script by markee on 03-06-2008 at 09:45 PM
code: This should post the information to the PHP (should help to eliminate problems with special characters in case you were just adding it to a parameter in the URL for a GET). This just continues on from vikke's code, you can always just add it in that other function if you really would prefer.... EDIT: not sure if the with will work over the local function and I can't test it while I'm at uni.... RE: [Request] Simple Script to send message to PHP Script by Dempsey on 03-07-2008 at 11:43 AM
Thanks vikke and markee, got it sorted now RE: [Request] Simple Script to send message to PHP Script by Richy on 03-07-2008 at 03:43 PM
Hello everybody, code: I don't want to create a white list or black list. I want to send all data to php. But when someone sends me a message, this script gives an error in debugging window: Script is now loaded and ready Function called: OnEvent_ChatWndReceiveMessage Error: 'email' is undefined (code: -2146823279) File: msn.js. Line: 17. Function OnEvent_ChatWndReceiveMessage returned an error. Code: -2147352567 Can anybody help me? RE: [Request] Simple Script to send message to PHP Script by Matti on 03-07-2008 at 05:49 PM
Quite easy in fact. You left the check for the "email", which was used as iterator variable for the white list. code: RE: [Request] Simple Script to send message to PHP Script by Richy on 03-08-2008 at 08:51 AM
Thank you Mattike, code: The error; Script is now loaded and ready Function called: OnEvent_ChatWndReceiveMessage Error: 'Contacts.0.Email' is null or not an object (code: -2146823281) File: msn.js. Line: 16. Function OnEvent_ChatWndReceiveMessage returned an error. Code: -2147352567 Also, I writed this PHP script. Is everything ok? code: RE: [Request] Simple Script to send message to PHP Script by Spunky on 03-08-2008 at 11:08 AM
code: That'll work. Although I'm sure Mattike's code should work. Might be because it's a collection and not a proper array. Someone clarify that for me? RE: [Request] Simple Script to send message to PHP Script by Richy on 03-08-2008 at 11:17 AM
Now, it gives; RE: [Request] Simple Script to send message to PHP Script by effection on 03-14-2008 at 08:03 PM post your code please il have a look RE: [Request] Simple Script to send message to PHP Script by Richy on 03-15-2008 at 08:43 AM
function SendToPHP(email,msg){ RE: [Request] Simple Script to send message to PHP Script by Richy on 03-19-2008 at 04:19 PM I can't understand. Why doesn't this script run? RE: RE: [Request] Simple Script to send message to PHP Script by yenerich on 04-04-2008 at 10:12 PM
quote: function SendToPHP(user,msg){ var xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); with(xmlhttp){ setRequestHeader("user",user); setRequestHeader("message",msg); onreadystatechange = function(){if(readyState==4 && status!=200) Debug.Trace("ERROR!\n\n email: "+email+"\n\n message"+msg);}; open("POST", "http://www.mydomain.com/msntest.php", true); send(null); } } function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MessageKind){ SendToPHP(Origin, Message); } This could help to just send the user taht sent the message and the message itself. |