| | |
Help me with this please!!!
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
I am making a whatsmyip.org clone and this is what I have so far but I want to get it to show the computer country of origin, and host of the visitors internet like on the "more info" page at whatsmyip.org does anyone know how???
PHP Syntax (Toggle Plain Text)
<HTML> <HEAD> <TITLE>Maddog's IPs'</TITLE> <META NAME="Keywords" CONTENT="IP, address, find ip address, ip addres, whats ip, ip find, ipconfig, ipaddress"> <META NAME="Description" CONTENT="Maddog's IP' - The #1 Way To Find Your IP Address !"> <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> <LINK TITLE="" HREF="ip.css" TYPE="text/css" REL="stylesheet"> </HEAD> <body> <div align="center"> <SCRIPT TYPE="text/javascript"><!-- doad2(); //--></SCRIPT> <table class="maintable" align="center" border="1" cellSpacing="0" cellPadding="0"> <tr> <td class="head"><div align="left"><img src="http://www.maddogsprofiles.com/flash/WHITEBAN.jpg" width="885" height="150"></div></td> <tr> <td class="ip"><h1 align="center">Your IP Is <p align="center"> <?php $ip = $_SERVER['REMOTE_ADDR']; echo "<b>IP Address = $ip</b>"; ?></h1> <h3 align="center"> <text>You are currently viewing this page in <text/> <map id="browser" ''name="firefox" "name="safari" "name="konqueror" name="internet explorer" name="opera" name="lynx" name="flock" name="netscape navigator" name="mosaic" ></map> <script> document.write( document.getElementById('browser').getAttribute('name')); </script>. </p> </td> </tr> <tr> <a href="mailto:webmastermaddog@maddogsprofiles.com" td height="88" class="ad"><img src="ad.gif" width="743" height="87"> </a> <SCRIPT TYPE="text/javascript"><!-- doad1(); //--></SCRIPT> </td> <tr> <td class="body"> <h3 align="center">Maddog's IPs' is the fastest and easiest way<br />to determine your IP address.</h3> <p> <h3 align="center"> <form action="http://www.google.com/cse" id="cse-search-box"> <div> <input type="hidden" name="cx" value="013221771976019527881:6kzpwitkmxy" /> <input type="hidden" name="ie" value="UTF-8" /> <input type="text" name="q" size="31" /> <input type="submit" name="sa" value="Search" /> </div> </form> <script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script> Copyright Maddog Noland Programming All Rights Reserved </div></td> </tr> </table> </div> </BODY> </HTML>
OHS=The Future!
•
•
Join Date: Aug 2007
Posts: 189
Reputation:
Solved Threads: 14
To show the origin country, a general way is to lookup into a MySQL database with updated IP country ranges, GeoLite Free is a choice. Some commercial databases provide location even into cities. After this, you can use the country code to get their corresponding flag.
To get WHOIS information there are several PHP classes that perform this function.
User agent and Referral URL is easy obtainable through $_SERVER environment variable. Deviating server load to client processing using Javascript to perform this tasks -like in your code- is always better.
To get WHOIS information there are several PHP classes that perform this function.
User agent and Referral URL is easy obtainable through $_SERVER environment variable. Deviating server load to client processing using Javascript to perform this tasks -like in your code- is always better.
Last edited by Tekmaven; Jul 21st, 2008 at 8:29 pm. Reason: Weird char in post
![]() |
Other Threads in the PHP Forum
- Previous Thread: Displaying in Problem..........
- Next Thread: what about that probs??
| Thread Tools | Search this Thread |
apache api array beginner binary broken cache cakephp checkbox class cms code confirm cron curl customizableitems database date display dynamic echo email error external fcc file files folder form forms forum freelancing function functions google header headmethod howtowriteathesis href htaccess html iframe image include insert ip javascript joomla limit link login mail malfunction menu method mlm mod_rewrite multiple mysql neutrality oop pageing pagerank paypal pdf php phpmysql play problem query question radio random recursion remote root script search select server sessions sms soap source space sql support! syntax system table template tutorial update upload url validator variable video web youtube





