As of January 13, 2007, I'm ZCE/Zend Certified Engineer (PHP 5)
I've noted that many people are searching here about how to find out City/Country/ISP details from IP; often referred as GeoIP. Here, I've compiled my replies that once I posted to comp.lang.php Get the IP Refer http://www.iana.org/assignments/ipv4-address-space/ipv4-address-space.xml and see which whois server should be used for the whois lookup Now, do the whois lookup. e.g., whois -h whois.apnic.net 61.x.x.x Parse the results. AFAIK, it will have the ISP, City and Country info For whois lookup, may use rwhois protocol through below PHP code: <?php function whois($host, $command) { $fp = fsockopen ($host, 43, $errno, $errstr, 100); if (!$fp) { $result = $errstr . $errno . "\n"; } else { fputs ($fp, $command . "\r\n\r\n"); $result = ''; while (!feof($fp)) { $result .= fgets ($fp, 128); } fclose ($fp); } return $result; } //debug... echo whois('whois.internic.net', 'php.net'); ?> Re...
Comments
i am a zend novice and in desperate need of someone's help in learning zend. I understand the layering of the framework but get confused as to put which file where. Can u please direct me to an authentic,tutorial not documentation but tutorial for a fresh starter like me
Because so far the tutorials that i have come across are not proper in the sense it produces errors.Please help.thanks
Am preparing for my Zend certification. I do have 1 year of experience in PHP so could u help me in the preparation for my certification.
Thanks
Ramya.C