Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Server Tracker

  1. #1
    Private First Class
    Join Date
    Dec 2012
    Posts
    127
    Thanks
    132
    Thanked 114 Times in 63 Posts

    Server Tracker

    Hey guys,
    currently I'm working on my own server-list or server-tracker nvm.
    Since my hosting provider is not allowing fSockOpen(), so there is my question is there any other way to get ip and port. Below simple code what I mean:

    PHP Code:
    <?php

    $ip 
    "127.0.0.1";
    $port "13";

    $con fsockopen("udp://$ip"$port$errno$errstr);
    if (!
    $con) {
        echo 
    "offline";
    } else {
        echo 
    "online";
    }

    ?>
    Tried on other hosting but they have restricted ports for some reasons.
    Last edited by Jeplaa; 8th April 2013 at 15:47.

  2. #2
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,010
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    there is no other way ;(
    timescale 0.01

  3. The Following User Says Thank You to kung foo man For This Useful Post:

    Jeplaa (8th April 2013)

  4. #3
    Private First Class
    Join Date
    Dec 2012
    Posts
    127
    Thanks
    132
    Thanked 114 Times in 63 Posts
    So I thought, thanks for reply.

  5. #4
    Corporal STAUFFi's Avatar
    Join Date
    Aug 2012
    Location
    Germany
    Posts
    269
    Thanks
    106
    Thanked 128 Times in 83 Posts
    this works only for Minecraft

  6. #5
    Corporal STAUFFi's Avatar
    Join Date
    Aug 2012
    Location
    Germany
    Posts
    269
    Thanks
    106
    Thanked 128 Times in 83 Posts
    Edit i can give you my script ->
    Click image for larger version. 

Name:	3146416.PNG 
Views:	121 
Size:	22.1 KB 
ID:	252

  7. #6
    Private First Class
    Join Date
    Dec 2012
    Posts
    127
    Thanks
    132
    Thanked 114 Times in 63 Posts
    Hey StauFFi,
    Well there is no problem about code. Just asked about fOpen() function, since hostings are not allowing this feature.

  8. #7
    Sergeant EvoloZz's Avatar
    Join Date
    Sep 2012
    Location
    Helsinki, Finland
    Posts
    360
    Thanks
    314
    Thanked 167 Times in 120 Posts
    Isn't fOpen() just for opening files? You ment fSockOpen()?

  9. #8
    Private First Class
    Join Date
    Dec 2012
    Posts
    127
    Thanks
    132
    Thanked 114 Times in 63 Posts
    Yep, that's right.

  10. #9
    Corporal STAUFFi's Avatar
    Join Date
    Aug 2012
    Location
    Germany
    Posts
    269
    Thanks
    106
    Thanked 128 Times in 83 Posts
    make


    Code:
    <?php 
    $filename = "server.cfg"; // Read Server Data
    $fp = fsockopen("udp://ip/".$filename, "14000", $errno, $errstr, 10); // Connected and streamed ip & port
     
    $contents = fread($fp, filesize($filename));
    fclose ($fp);
    ?>
    Last edited by STAUFFi; 30th April 2013 at 15:36.

  11. #10
    Private
    Join Date
    Nov 2014
    Posts
    25
    Thanks
    9
    Thanked 3 Times in 2 Posts
    Quote Originally Posted by STAUFFi View Post
    make


    Code:
    <?php 
    $filename = "server.cfg"; // Read Server Data
    $fp = fsockopen("udp://ip/".$filename, "14000", $errno, $errstr, 10); // Connected and streamed ip & port
     
    $contents = fread($fp, filesize($filename));
    fclose ($fp);
    ?>
    All that does is get the server.cfg if it's located in the directory root?

Posting Permissions

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