mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2009
Posts: 4
J
jimmyo Offline OP
Self-satisified door
OP Offline
Self-satisified door
J
Joined: Jan 2009
Posts: 4
Is there a way to call a php program from a mirc script & passing parameters back and forth from mirc. eg if a person types certain text, then the trigger passes the text that they typed to a php program, which then returns a response back to mirc and mirc then echos that response to the channel.

Thanks for any help / suggestions that you can provide.

...Jim

Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
Yes. If the php script is on a website you'd need sockets to send an HTTP request to the server. If the script is local on your machine it will be just like calling any executable and getting results back (in this case you'd be running the php interpreter, php.exe). There are many ways to do the latter, the simplest being to redirect the script output to a file (php myscript.php > file.txt) and then read it. Other options are to use a dll/com object to directly read and write from the process but this needs a COM or DLL script. There's a COM script called STDCatcher and a dll called exec.dll if that's what you're looking for.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"

Link Copied to Clipboard