360haven works best with JavaScript enabled
Display Lag time between user and your server.
Loading
Register
Login
Results 1 to 3 of 3
  1. #1
    Senior Member
    ohnoyekoms is offline
    Join Date : Apr 2012
    Posts : 103
    Array

    secret smile Display Lag time between user and your server.

    Place this snippet in your index.php and when the user loads your site, it'll tell them their ping time from them to the server.


    function GetPing($ip=NULL) {
    if(empty($ip)) {$ip = $_SERVER['REMOTE_ADDR'];}
    if(getenv("OS")=="Windows_NT") {
    $exec = exec("ping -n 3 -l 64 ".$ip);
    return end(explode(" ", $exec ));
    }
    else {
    $exec = exec("ping -c 3 -s 64 -t 64 ".$ip);
    $array = explode("/", end(explode("=", $exec )) );
    return ceil($array[1]) . 'ms';
    }
    }
    echo "<center><font color=white face=Verdana size=1>your lag to this server " . GetPing() . "<br>";

    Downloads : 14 || Uploads : 0 || Rep Power : 2396 || Posts : 103 || Thanks : 20 || Thanked 40 Times in 16 Posts


    Need file hosting? go here


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


  3. #2
    The Immortal God
    Rpg_Fan

    CloudStrife7x is offline
    Join Date : Dec 2010
    Location : Unknown
    Age : 30
    Posts : 18,755
    Array
    Twitter: @

    Re: Display Lag time between user and your server.

    very nice tutorial shared ohnoyekoms :)
    Downloads : 157 || Uploads : 0 || Rep Power : 22357 || Posts : 18,755 || Thanks : 4,451 || Thanked 3,096 Times in 2,607 Posts



  4. #3
    Retired Staff

    thegutta is offline
    Join Date : Jun 2011
    Location : On Top Of The World
    Posts : 10,473
    Array
    Twitter: @
    Quote Originally Posted by CloudStrife7x View Post
    very nice tutorial shared ohnoyekoms :)
    +1 :-)
    Downloads : 47 || Uploads : 0 || Rep Power : 13390 || Posts : 10,473 || Thanks : 3,231 || Thanked 1,396 Times in 1,224 Posts




 

 

Similar Threads

  1. Aqua Top Display
    By Serious_M in forum Youtube Famous
    Replies: 2
    Last Post: 08-30-2013, 08:39 PM
  2. Sony Computer Entertainment America - PlayStation 3D Display Bundle
    By BrayWyatt in forum PS3 News, Updates, and Rumors
    Replies: 5
    Last Post: 12-20-2011, 06:32 PM
  3. Modern Warfare 3 update addresses lag, certain glitches
    By jkipp82 in forum Xbox 360 Game News
    Replies: 0
    Last Post: 12-13-2011, 02:17 PM
  4. Brink patch scheduled for next week, addresses lag
    By jkipp82 in forum Xbox 360 Game News
    Replies: 2
    Last Post: 05-23-2011, 04:20 PM

Visitors found this page by searching for:

Nobody landed on this page from a search engine, yet!

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
  •  

About 360haven

    360haven is an Forum Devoted To Game modding Fans from all over the world.

    An Awesome Community of Xbox 360 Gamers, Modders and Developers who Create & Share Tutorials, Applications, Gfx, Trainers and Gamesaves.

    A haven for the l33t.
    A scarce paradise for modders.

Like this page

Google+