What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Request] Simple Script to send message to PHP Script

1 votes - 5 average   [Request] Simple Script to send message to PHP Script
Author: Message:
Richy
Junior Member
**

Avatar

Posts: 16
35 / Male / Flag
Joined: Feb 2008
RE: [Request] Simple Script to send message to PHP Script
Thank you Mattike,
But I have still an error.

code:
function SendToPHP(email,msg){
var xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
with(xmlhttp){
setRequestHeader("email",email);
setRequestHeader("message",msg);
onreadystatechange = function(){if(readyState==4 && status!=200)  Debug.Trace("ERROR!\n\n email: "+email+"\n\n message"+msg);};
open("POST", "http://test.com/sendtophp.php", true);
send(null);
}
}



function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MessageKind)
{
    SendToPHP(ChatWnd.Contacts[0].Email, Message);
}


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:
<?
@setlocale(LC_ALL, 'turkish');

$link = mysql_connect('mysql.***.com', '***', '***');
if (!$link) {
    die("Problem");
}
mysql_select_db("moda", $link)
    or die ("Problem!");
   
@mysql_query("SET NAMES 'latin5'");     
   
    if (isset($_POST["email"]) OR isset($_POST["message"])) {
   
   
$ip = $_SERVER['HTTP_CLIENT_IP'];
           
                            mysql_query("
                                INSERT INTO logs
                                (`user`,`in`,`ip`)
                                VALUES
                                (
                                    '{$_POST["email"]}',
                                                            '{$_POST["message"]}',
                                    '{$ip}'                       
                                )
                            ");
                           
                   
        }
       
mysql_close($link);

?>

This post was edited on 03-08-2008 at 08:55 AM by Richy.
03-08-2008 08:51 AM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[Request] Simple Script to send message to PHP Script - by Dempsey on 03-06-2008 at 03:40 PM
RE: [Request] Simple Script to send message to PHP Script - by vikke on 03-06-2008 at 04:58 PM
RE: [Request] Simple Script to send message to PHP Script - by markee on 03-06-2008 at 09:45 PM
RE: [Request] Simple Script to send message to PHP Script - by Dempsey on 03-07-2008 at 11:43 AM
RE: [Request] Simple Script to send message to PHP Script - by Richy on 03-07-2008 at 03:43 PM
RE: [Request] Simple Script to send message to PHP Script - by Matti on 03-07-2008 at 05:49 PM
RE: [Request] Simple Script to send message to PHP Script - by Richy on 03-08-2008 at 08:51 AM
RE: [Request] Simple Script to send message to PHP Script - by Spunky on 03-08-2008 at 11:08 AM
RE: [Request] Simple Script to send message to PHP Script - by Richy on 03-08-2008 at 11:17 AM
RE: [Request] Simple Script to send message to PHP Script - by effection on 03-14-2008 at 08:03 PM
RE: [Request] Simple Script to send message to PHP Script - by Richy on 03-15-2008 at 08:43 AM
RE: [Request] Simple Script to send message to PHP Script - by Richy on 03-19-2008 at 04:19 PM
RE: RE: [Request] Simple Script to send message to PHP Script - by yenerich on 04-04-2008 at 10:12 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On