PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <sockets>
new const g_szHost[] = "website.com";
new const g_szFile[] = "/check.php?steamid=";
new const g_szDataStart[] = "^r^n^r^n";
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
set_task(5.0,"cmd_GetData")
}
public cmd_GetData( id )
{
new authid[32]
get_user_authid(id,steamid,31)
new iSocket , iError;
iSocket = socket_open( g_szHost , 80 , SOCKET_TCP , iError );
if( ( iSocket <= 0 ) || iError )
return PLUGIN_HANDLED;
static szPacket[256];
g_TimedOut[ id ] = 0;
formatex( szPacket , 255 , "GET %s%s HTTP/1.1^r^nHost: %s^r^nConnection: close^r^n^r^n" , g_szFile,steamid , g_szHost );
socket_send( iSocket , szPacket , strlen( szPacket ) );
g_fSocketWait[ id ] = get_gametime();
new param[ 2 ];
param[ 0 ] = id;
param[ 1 ] = iSocket;
if( !task_exists( 5511 + id ) )
set_task( 0.1 , "CheckRecv" , 5511 + id , param , 2 , "b" );
return PLUGIN_HANDLED;
}
public CloseSocket( id , iSocket )
{
remove_task( 5511 + id );
socket_close( iSocket );
}
basic will be like this rigth ?