Hum, so you want send data from a amxmodx plugin to a php script or send data from a php script to a amxmodx plugin ? who open the connexion ? In fact I think you've no choice because the socket module doesn't allow to listen for tcp connection ( I'm not sure @ 100% ).
edit : I've read your pm too fast ... ...
There is to method to send datas to a php script, get and post ... but get is easier
First we've to know how do a post/get request ...
The best way to understand is to analyse a post request.
//Open wireshark, which is certainly the best packet sniffer
//Open a thread
//Write a reply
//Record packet & click on reply
We get in the first packet
PHP Code:
POST http://forums.alliedmods.net/newreply.php?do=postreply&t=58056 HTTP/1.1
Host: forums.alliedmods.net
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*;q=0.5
Accept-Language: fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
Content-Type: application/x-www-form-urlencoded
Referer: http://forums.alliedmods.net/showthread.php?t=58056
Content-Length: 215
Pragma: no-cache
Cache-Control: no-cache
ofc there is a \r\n at the end of each line and a double at the end of the first packet
in the second packet
PHP Code:
ajax=1&ajax_lastpost=1184769975&message=Just%20useless%2C%20but%20well%20coded%20%3A%29%3Cbr%3E&wysiwyg=1&styleid=0&signature=1&fromquickreply=1&s=&do=postreply&t=58056&p=who%20cares&parseurl=1&loggedinuser=21173&s=
So, most of the thing here are useless for us.
so to do a get request you've just to send:
PHP Code:
hackziner@hackziner:/usr/lib/cgi-bin/server/pr_directurl$ telnet amxmodx.org 80
Trying 74.52.23.194...
Connected to c2.17.344a.static.theplanet.com.
Escape character is '^]'.
get http://forums.alliedmods.net/showthread.php?t=58038\r\n
t take the value 58038 ... to get this value in php "$t = _GET["t"];"
If you wanna try, just open telnet and do the same thing ...
after sending this request, the http server reply on the same connexion.
So you can see if your request works with telnet ...
The second one with the post ... I'm too lazy

It's the same thing but datas are after the http header ( here in the second packet )
So, how do to this thing in pawn ... just copy an other code
Admin mail do the same thing.
#include <sockets>
new buff[1024]
new socket = socket_open( "http://www.amxmodx.org"", 80, SOCKET_TCP, error );
//http uses tcp and the default port is 80 ...
formatex( buff, 1023, "get http://forums.alliedmods.net/showthread.php?t=58038^r^n" );
socket_send( socket, buff, 1024);
set a task with
if (socket_change( socket) socket_recv( socket, buff, 1023)
to get the reply...
The reply is something like that :
PHP Code:
HTTP/1.0 200 OK
Date: Wed, 18 Jul 2007 16:11:07 GMT
Server: Apache/2.2.3 (Unix) mod_ssl/2.2.3 OpenSSL/0.9.7a DAV/2
X-Powered-By: PHP/5.2.2
Cache-Control: private
Pragma: private
Content-Type: text/xml; charset=windows-1252
X-Cache: MISS from proxy.free.fr
X-Cache-Lookup: MISS from proxy.free.fr:3128
Proxy-Connection: close
<?xml version="1.0" encoding="windows-1252"?>
<postbits>
<postbit postid="504914"><![CDATA[<!-- post #504914 -->
<!-- open content container -->
Some servers need a full and correct request, other only need something which looks like the normal request
__________________