Results 1 to 10 of 18

Thread: Receiving server info

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #12
    Global Mossaderator Mitch's Avatar
    Join Date
    Nov 2012
    Posts
    654
    Thanks
    204
    Thanked 450 Times in 305 Posts
    This is the code i made a long time ago.
    PHP Code:
    $errno $errstr null;
    $cmd "\xFF\xFF\xFF\xFFgetstatus";
    $f fsockopen('udp://' $ip$port$errno$errstr$timeout);
    if (!
    $f)
        die (
    "Unable to connect. Error $errno - $errstr\n");
    socket_set_timeout ($f10);
    fwrite ($f$cmd);
    $data '';
    while (
    $d fread ($f10000)) {
        
    $data .= $d;
    }
    fclose ($f); 
    http://php.net/manual/en/function.fread.php
    Last edited by Mitch; 5th May 2015 at 20:06.

  2. The Following 2 Users Say Thank You to Mitch For This Useful Post:

    kung foo man (6th May 2015),maxdamage99 (6th May 2015)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •