SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot
    Join Date
    Jun 2000
    Posts
    165
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,


    Does anyone know how to execute traceroute in php please?

    I've tried:

    system("traceroute http://www.yahoo.com");

    but doesn't seem to happen...


    Cheers,

    Jason

  2. #2
    SitePoint Evangelist
    Join Date
    Jul 2000
    Location
    Warwickshire, England
    Posts
    557
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    $something = `tracert http://www.yahoo.com`; for windows should work.

    For unix, the trace route program is usually called traceroute, but is it possible you dont have it installed?

    Also, system returns a string.. so you would need to do $something = system...
    or echo (system ..);

    However according to a comment on php.net, system() is unreliable at returning the results of a program so just use the `command` method, like in perl.



Bookmarks

Posting Permissions

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