What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Run a script from PHP

Run a script from PHP
Author: Message:
Eagle_Erwin
Junior Member
**

Avatar
Eagle Erwin

Posts: 17
Reputation: 1
38 / Male / –
Joined: Aug 2006
O.P. Run a script from PHP
In my student house, I have a webserver with PHP and I use Messenger Live with Plus!. I have written some scripts, and it all works very well. But in some cases, I want to run a script from a PHP script.

For example: I have a webcam on my site. When somebody clicks on the webcam-link I want to get a message from WLM that says who is watching. Now it works by editing the Plus! script, so it restarts itself.

Is it possible to do it in another way? It will give my sites much more features: an input-field where you can type text, and a button. When you press the button, a Plus! script will send that message to my WLM account. So everybody can talk to me via WLM, without having WLM or having me in their contact list.
11-08-2006 11:43 AM
Profile PM Web Find Quote Report
Ezra
Veteran Member
*****

Avatar
Forgiveness is between them and God

Posts: 1960
Reputation: 31
37 / Male / Flag
Joined: Mar 2003
RE: Run a script from PHP
I suggest you read this.

http://nl2.php.net/manual/en/ref.w32api.php
[Image: 1-0.png]
             
11-08-2006 11:54 AM
Profile PM Web Find Quote Report
Eagle_Erwin
Junior Member
**

Avatar
Eagle Erwin

Posts: 17
Reputation: 1
38 / Male / –
Joined: Aug 2006
O.P. RE: Run a script from PHP
Thanks for your fast reply. But is seems that the w32api only works for PHP 4.x.x. I'm using PHP 5.2.0. I saw something about the ffi extension, but it's not compatible since PHP 5.1.0.

Any other options?
11-08-2006 01:07 PM
Profile PM Web Find Quote Report
hmaster
Senior Member
****

Avatar

Posts: 716
Reputation: 24
33 / Male / Flag
Joined: Nov 2004
RE: Run a script from PHP
quote:
Originally posted by Eagle_Erwin
Is it possible to do it in another way? It will give my sites much more features: an input-field where you can type text, and a button. When you press the button, a Plus! script will send that message to my WLM account. So everybody can talk to me via WLM, without having WLM or having me in their contact list.
You can have the "messages" saved to a file. Then download the file to read through your plus script. And it can have a reply which will send a reply message to that person who can reply back through the page on your website.
[Image: sig.png]
11-08-2006 04:29 PM
Profile PM Web Find Quote Report
Eagle_Erwin
Junior Member
**

Avatar
Eagle Erwin

Posts: 17
Reputation: 1
38 / Male / –
Joined: Aug 2006
O.P. RE: RE: Run a script from PHP
quote:
Originally posted by hmaster
quote:
Originally posted by Eagle_Erwin
Is it possible to do it in another way? It will give my sites much more features: an input-field where you can type text, and a button. When you press the button, a Plus! script will send that message to my WLM account. So everybody can talk to me via WLM, without having WLM or having me in their contact list.
You can have the "messages" saved to a file. Then download the file to read through your plus script. And it can have a reply which will send a reply message to that person who can reply back through the page on your website.



Ok, sounds like a good option, but how does the WLM script know that the file is modified, and that the text in it has to be send to a person via WLM?
11-08-2006 04:39 PM
Profile PM Web Find Quote Report
hmaster
Senior Member
****

Avatar

Posts: 716
Reputation: 24
33 / Male / Flag
Joined: Nov 2004
RE: Run a script from PHP
quote:
Originally posted by Eagle_Erwin
Ok, sounds like a good option, but how does the WLM script know that the file is modified, and that the text in it has to be send to a person via WLM?
You would have to start a timer to check the file every x amount of seconds/minutes. The text could only be sent if the person is on your allow list otherwise it won't be able to send.
[Image: sig.png]
11-08-2006 04:41 PM
Profile PM Web Find Quote Report
Eagle_Erwin
Junior Member
**

Avatar
Eagle Erwin

Posts: 17
Reputation: 1
38 / Male / –
Joined: Aug 2006
O.P. RE: RE: Run a script from PHP
quote:
Originally posted by hmaster
quote:
Originally posted by Eagle_Erwin
Ok, sounds like a good option, but how does the WLM script know that the file is modified, and that the text in it has to be send to a person via WLM?
You would have to start a timer to check the file every x amount of seconds/minutes. The text could only be sent if the person is on your allow list otherwise it won't be able to send.



I'm afraight a timer would use a big amount of system resources, when it have to check a file every 5 sec.

I was more looking for a command-line thing or maybe an API, as Ezra posted. The problem is, I know nothing about API's, and it looks pretty hard for me.
11-08-2006 04:57 PM
Profile PM Web Find Quote Report
Ezra
Veteran Member
*****

Avatar
Forgiveness is between them and God

Posts: 1960
Reputation: 31
37 / Male / Flag
Joined: Mar 2003
RE: Run a script from PHP
Maybe make an external exe that gets started by php, exec still works on PHP 5.
[Image: 1-0.png]
             
11-08-2006 05:45 PM
Profile PM Web Find Quote Report
hmaster
Senior Member
****

Avatar

Posts: 716
Reputation: 24
33 / Male / Flag
Joined: Nov 2004
RE: Run a script from PHP
quote:
Originally posted by Eagle_Erwin
I'm afraight a timer would use a big amount of system resources, when it have to check a file every 5 sec.
I dont think so it doesnt take that much resources. Try it and you'll see.
[Image: sig.png]
11-08-2006 06:01 PM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »


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