rendered paste bodyon *:sockread:phpsend*:{
sockread -f %temp
echo -a Socket connection recieved Data recieved - %temp
set %bleh1 $sockname
if (nick iswm %temp) { send-to-php Nick: $me }
if (chans iswm %temp) { send-to-php $phpchans }
if (clist iswm %temp) { send-to-php $phpclist }
if (conuptime iswm %temp) { send-to-php $uptime(server,2) }
if (sysuptime iswm %temp) { send-to-php $uptime(system,2) }
if (topic* iswm %temp) { send-to-php $strip($chan($gettok(%temp,2,32)).topic) }
if (users* iswm %temp) { send-users $gettok(%temp,2,32) }
if (status iswm %temp) { send-to-php $status }
if (numchans iswm %temp) { send-to-php $chan(0) }
halt
:error
if (*socket in use* iswm $error) { sockclose $regsubex($error,(.+\'(\w+)\'.+), \2) }
}