Last update: November 25, 2010
Update: GeoIP Locator version 2 has been released
- Now GeoIP Locator supports IP caching for better performance. IP Caching is possible by creating SQL table ip_cache to enable this service, and it is required just once to retrieve the IP information from URL API and then that information is stored in the database when, and by parsing the same IP information again execution times changes in tremendous way, 20 or higher times faster
- Caching can be disabled!
- The way of getting IP information is changed, and that is CURL content parsing, this has speed up the script for 50% faster to get IP info
- A new template has been added called `template_4`
GeoIP Locator introduction
GeoIP Locator is a tool for tracking information of any IPv4 address. Easy implementation and methods makes GeoIP Locator flexible and easy to embbed to your website or any project by requiring two line code declaration.
This script includes:
- 9 different examples
- IP Lookup form
- AJAX IP Locator (Extra example)
- 236 Country flags vectors
- Source files (2 classes, 1 interface)
- API documentation about classes and interfaces
- Users Manual – Config and Install
Features
It generates certain information for IP such as:
- Country Code
- Country Name
- Region Code
- Region Name
- City Name
- Postal Address
- Latitude
- Longitude
- Timezone
As another feature of this script is:
- Country Flag
- Location Map
Requirements
- PHP version 4.3 or greater is recommended
- JavaScript (in AJAX example)
Implementation
Easy-Two-Line implementation. Check demo website http://arlindnushi.dervina.com/geoiplocator/ for more details about GeoIP locator.
I think you have missplaced the variable so try this
<div class="phone"> <?php echo $info->getCountryFlag(64); ?> <h4>FREE SHIPPING TO <strong><?php echo $info->getCountryName(); ?></strong>!</h4></div>
and it should work!
Thanks for previous reply. If we solve this – you will make my day!
I just tried that, but I get the same error.
Fatal error: Call to a member function getCountryFlag() on a non-object in /home/site/public_html/app/code/local/GeoIP/Custom/Block/IP.php on line 29
Hmm, I dont know where is the problem without touching the code mysel
Can you send me FTP details so I can check and fix online. Just give me specific FTP access to /home/site/public_html/app/code/local/GeoIP/Custom/Block/ and I will modify the file IP.php
Hello,
I am looking for a plugin that will detect a users location, the city and state most importantly, and then based on that location it will serve simple content. Such as, if from Chicago, it will say, “Hello Chicago person”, if from LA, it will say, “Hello LA person”. Could this be easily implemented?
I ask easily, as I have entry level of php skills. If I have issues, what kind of support can I expect from you?
Thanks in advance.
Is it possible to add several IPs and have multiple markers show up on the map?
I was going to buy this but when testing it out it did not work. My IP is 50.89.131.140 and your script says somewhere in Canada but I am in Florida in the United States. Please look into this so I can purchase your script.
Hi jjjrmy,
The reason why this generate that information because it uses external database to test IP where it comes from, and that website is ipinfodb.com so this script isn’t responsible for the accuracy of the location it justs simplifies the methods of getting user information via that site.
I hope I was clear.
Arlind
Hi..Great work.,,,
just a question, is it possible to create my own sql db and call the countries ip from my database instead? as i am having problem not all ISPs in my country are listed on the external database .
even on your demo link its showing my ip wrong country
http://arlindnushi.dervina.com/geoiplocator/ip_lookup_example/
thanks
This script no longer works, even your example is broken.
Hi, l have this script installed and connecting to a database, but it’s not writing any rows. Can you tell me why it doesn’t appear to be caching?
Hello, l added a little debugging and found that this was/is the error: Queryproblem: Unknown column ‘STATUS’ in ‘field list’
The included *.sql file does not have a column for ‘STATUS’ when creating the ip_cache table.
Can you give me the specifications for this column? I created a varcahr(10) with a default of ‘OK’ and added indexing—is this correct?
Hi, it seems that the script periodically throws the following fatal error:
[30-Aug-2013 07:31:29 America/Denver] PHP Fatal error: Call to a member function xpath() on a non-object in MYSITE/GeoIPLocator.class.php on line 162
Can you please help me fix or suppress this error?
Hi brainhost,
There might be an issue with API key which leads you to this error. Please verify if you have correctly put the API key to GeoIPLocator.interface.php then try again.
And if you want a add a “failsafe” feature to this block, just append this code before the line 162
if( ! $xml){ return null;}
Hopefully this will work for you.
Arlind
Hi thank you for the response.
Which API key do you think is incorrect? Can you please give me updated instructions on how to obtain a google api key? Your documentation is outdated.
DONT BUY THIS SCRIPT. ITS NOT WORKING.
Download PHP Scripts GeoIP Locator CodeCanyon Free
http://www.xvcz.com/download-php-scripts-geoip-locator-codecanyon-free/
No comments:
Post a Comment