PHP Traceroute Script

Simple php script which allows to check the traceroute connection status within Linux or windows environment.


  • Traceroute is an internet tool which is used to display the route path across Ip.
  • Php traceroute script displays the delay time taken by the packets to receive in milliseconds.
  • The php script fetches the status of a system using the traceroute protocol.
  • Traceroute script displays the route path of Ip which is connected.
  • Easy to integrate and user friendly.


PHP Traceroute Script / Source Code



function trace_router($host,$unix)

$host= preg_replace ("/[^A-Za-z0-9.]/","",$host);
echo '<pre>';
//check target IP or domain
if ($unix)

system ("traceroute $host");
system("killall -q traceroute");// kill all traceroute processes in case there are some stalled ones or use echo 'traceroute' to execute without shell
system("tracert $host");
echo '</pre>';
  • Release Date - 21-11-2015
  • Get free version without ©copyright link for just $10/-
  • For customization of this script or any script development, mail to


  • Copy and paste the above source code to run the script.
  • For linux install traceroute by using the command sudo apt-get install traceroute, and use the command line as trace_router("",1);
  • For windows install tracert and use the command line as trace_router("",0);
  • Traceroute should be installed in the server to run this script.
  • Use this traceroute script to identify status of your traceroute connection.


Related Scripts

Free Php Scripts

Ask Questions

Ask Question