News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Joshua Thijssen's Blog:
Creating a traceroute program in PHP
December 02, 2010 @ 13:09:07

Joshua Thijssen has a new post to his blog looking at taking a common unix tool - traceroute - and seeing if he could translate it into PHP where it could be called directly without the need for something like exec.

Today i was reading upon this wonderful article about writing a trace-route program in Python in 40 lines. Even though trace-route is one of the many tools i use on day to day basis, i never really got into writing a version myself (something I like to do just to gain knowledge how things works). So when I was reading this post, i thought, Python is nice, but is it possible to do it in PHP as well? The answer to that: yes and no..

His post introduces you to "traceroute" (including a bit on how it works) in case you're either not a unix user or haven't gone much past some of the basics of the operating system type. One issues he butted up against was problems with the socket extension in PHP and inconsistencies with the underlying connection types. Another is the limitation of the tool only working as the root superuser. He includes the actual code and some sample output if you'd like to try it for yourself.

0 comments voice your opinion now!
traceroute program socket issue


blog comments powered by Disqus

Similar Posts

PHPBuilder.com: Two PHP 5 Security Flaws Found

Maggie Nelson's Blog: php|architect: Database Design for PHP Programmers by Mac Newbold

James Cohen's Blog: How to Avoid Character Encoding Problems in PHP

PHPBuilder.com: PHP Scripts for Interacting with Networks

Secubos.com: Cross-Site Scripting Vulnerability in phpFaber


Community Events





Don't see your event here?
Let us know!


conference framework community threedevsandamaybe api podcast laravel application series introduction language code deployment interview release developer zendserver tips list development

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework