| | |
Based on IP address change the info of a site
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: May 2008
Posts: 90
Reputation:
Solved Threads: 0
Hi,
Can I change the information of a site depending on ip address.
For example:
I have different folders for each geographic location, say for USA it should show a different site, for UK it should show a different site, like wise depending on the IP address it should go to that particular folder or index file.
Is tht possible using php?
Can I change the information of a site depending on ip address.
For example:
I have different folders for each geographic location, say for USA it should show a different site, for UK it should show a different site, like wise depending on the IP address it should go to that particular folder or index file.
Is tht possible using php?
Suhasini
•
•
Join Date: May 2008
Posts: 31
Reputation:
Solved Threads: 5
•
•
•
•
Hi,
Can I change the information of a site depending on ip address.
For example:
I have different folders for each geographic location, say for USA it should show a different site, for UK it should show a different site, like wise depending on the IP address it should go to that particular folder or index file.
Is tht possible using php?
-r
•
•
Join Date: May 2008
Posts: 31
Reputation:
Solved Threads: 5
you can parse country information from whois response. the various ip authorities have different record formats so you have some work ahead of you.
ARIN will tell you if you need to go to another authority. Look for the Referral Server field. The presence of this field indicates that the record is delegated.
Also look for and follow referral records to the final netblock record. if you get a record with nothing but netblocks, the smallest netblock is the one you need to search for the whois record on to get the information. These referral records are created by ISP's who sublet chunks of their IP allocation.
If you aren't familiar with text parsing and especially IP address calculations, working with whois, and need to do this in a hurry, I'd buy the database. It's a *lot* easier. They have a trial database so you can demo it. Just make sure you use IP's in the trial database for demo.
ARIN will tell you if you need to go to another authority. Look for the Referral Server field. The presence of this field indicates that the record is delegated.
Also look for and follow referral records to the final netblock record. if you get a record with nothing but netblocks, the smallest netblock is the one you need to search for the whois record on to get the information. These referral records are created by ISP's who sublet chunks of their IP allocation.
If you aren't familiar with text parsing and especially IP address calculations, working with whois, and need to do this in a hurry, I'd buy the database. It's a *lot* easier. They have a trial database so you can demo it. Just make sure you use IP's in the trial database for demo.
![]() |
Similar Threads
- Premium Domains $2000 - $15000 (Domain Names for Sale)
- This Should be Easy for You Guys! (Linux Servers and Apache)
- Googles Patent is out (Search Engine Optimization)
- another newbie with alot of redhat and apache server Q'S (Linux Servers and Apache)
- GET! GOT! GOTCHA! I still don't Get it... (C++)
- This ought to be simple - extra spaces (PHP)
Other Threads in the PHP Forum
- Previous Thread: Help with regular expression please
- Next Thread: Profile Help needed
| Thread Tools | Search this Thread |
301 access apache api array autocomplete beginner binary broken button cakephp checkbox class cms code compression cron curl data database date display dropdown dropdownlist duplicates dynamic echo email error execution file files folder form forms function functions google href htaccess html htmlspecialchars httppost image include insert integration ip javascript joomla jquery limit link links login mail md5 menu methods mlm multiple mysql oop paypal pdf pdfdownload php phpvotingscript problem query radio random recursion remote script search secure server session sessions sms source space sql subscription syntax system table tutorial update upload url validator variable video virus volume votedown web youtube





