I hit the script by http://server/haha.php?ip=192.168.1.1 But the script entered an endless loop. What's wrong? -- .~. Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org / v \ Simplicity is Beauty! May the Force and Farce be with you! /( _ )\ (Ubuntu 6.06) Linux 2.6.16.20 ^ ^ 11:48:01 up 8 days 21:31 0 users load average: 1.06 1.06 1.20 news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk
<html><head></head> <body onload=document.myform.submit()> <?php function getLocationCaidaNetGeo($ip) { $NetGeoURL = "http://netgeo.caida.org/perl/netgeo.cgi?target=".$ip; if($NetGeoFP = fopen($NetGeoURL,r)) { ob_start(); fpassthru($NetGeoFP); $NetGeoHTML = ob_get_contents(); ob_end_clean(); fclose($NetGeoFP); } return $NetGeoHTML; } if ($HTTP_POST_VARS['btnsubmit']) { print_r(getLocationCaidaNetGeo($_POST['ip'])); } else { ?> <form method="post" enctype="multipart/form-data" name="myform" action="<?php echo($PHP_SELF); ?>"> <input type="text" name="ip"> <input type="submit" name="btnsubmit" action="submit"> </form> <?php } ?> </body></html>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php