Power Your Website with Real-Time PHP IP Geolocation

Our PHP geolocation API lets you level up your website user experience with real-time geo-targeting location data. 

With just a few lines of code, your site can automatically adapt content, language, currency, and more using visitor’s location.

Try PHP IP Geolocation

More engagement, more conversions, without writing any code.

capterra rating Geoplugin
rating starts
google rating Geoplugin
rating starts
google rating Geoplugin
rating starts
Graphic of PHP IP Geolocation Software with developers discussing code
Graphic of PHP IP Geolocation Software with developers discussing code

What Is PHP IP Geolocation Software?

PHP IP geolocation software identifies a visitor’s location based on their IP address using PHP code. With PHP IP geolocation service, developers can program HTML or dynamic location-based websites without any hassle.

When you get user geolocation using PHP, you’ll have enough data to geo-localize different aspects of your webpage for each visitor.

Simply integrate our geolocation PHP script, and you’re good to go.


Features

Features of the PHP Geolocation Plugin

The PHP IP Geolocation plugin offers comprehensive data with every visitor's IP. If you don’t need all of that data, you can also filter for specific variables.

Get City From IP Using PHP

Have a special offer for specific cities? Use the PHP API to get a city from IPs and make city-specific customizations to your pages in a snap. Using geoPlugin, you can also get country by IP PHP API.

Get Country by IP Using PHP

Send a request, get country from IP address using PHP API and show customers what’s available in their country.

PHP Geolocation Currency Converter

Get geolocation from IPs using PHP and use the exchange rate to automatically display prices in each visitor’s local currency. We support a wide range of global currencies for maximum convenience.

How Does the GeoPlugin PHP Web Service Work?

The GeoPlugin PHP GPS location web service retrieves visitor location data in seconds using their IP address. You can access the country, city, zip code, time zone, latitude, longitude, currency, language, and more using client’s IP address.

The GeoPlugin PHP Web Service retrieves geolocation data by cross-referencing the visitor’s IP address with a global IP database. This database matches IPs to locations and calculates location details like country and city for accurate geotargeting.

Simply embed our PHP IP plugin script, and the moment visitors land on your site, their data will be at your fingertips.

Example of a PHP Geolocation Script

The following is a PHP geolocation example request for an IP’s geolocation:

    echo(
    var_export((unserialize(file_get_contents('http://www.geoplugin.net/php.gp?ip='.
    $_SERVER['REMOTE_ADDR'])));
Response:
array (
'geoplugin_request' => 'xx.xx.xx.xx', (IP) 
'geoplugin_status' => 200,
'geoplugin_delay' => '1ms',
'geoplugin_credit' => 'Some of the returned data includes GeoLite2 data created
by MaxMind, available from https://www.maxmind.com.',
'geoplugin_city' => 'Karachi',
'geoplugin_region' => 'Sindh',
 'geoplugin_countryName' => 'Pakistan',
'geoplugin_latitude' => '24.9239',
'geoplugin_longitude' => '67.1423',
'geoplugin_currencyCode' => 'PKR',
'geoplugin_currencySymbol' => '₨',
'geoplugin_currencyConverter' => '277.5742',
)

PHP Geolocation Class

Our laravel or PHP IP API comes with complete setup instructions. Download the geoPlugin PHP class for a detailed example and tips to guide you through setup and integration.

The same geolocation web services are available via JavaScript, ASP XML, SSL, and JSON, too.

Have questions? Get in touch!


Use Cases of PHP Geolocation API

There are many scenarios for using geolocation services. Here are a few of them:  

Personalized social interactions:

Software supports generating information tailored to the audience’s needs. This approach delivers a more relevant user experience.

Regional content adaptation

Users might have restricted access to certain website features. Additional geographic setup ensures compliance with territorial regulations.

Location-based search:

PHP geolocation API improves the relevance of user recommendations. Thus, they can find local businesses and services much more easily.

Fraud detection and prevention:

Geolocation data can detect discrepancies in a user’s location during logins or transactions, adding an extra layer of security.

Why Developers Choose GeoPlugin’s PHP Geolocation API

With GeoPlugin Geolocation API, developers can expand their user base faster by delivering tailored experiences that increase visitor satisfaction.

Here’s what they particularly get:

Easy-to-use software that doesn’t require any complicated installation.
Simple PHP geolocation IP address retrieval with a single API call.
Support for multiple programming languages.
Ability to use the service for different types of scripting.
Partially free and comprehensive paid plans to suit teams on any budget.
Compatible With Leading
CMS & e-Commerce Platforms

What Our Customers Say

Our users highly appreciate the capabilities our service provides, and here's what they say.

star image
Apr 8, 2024

Using Geo targeting enables us to direct our international customers to tailored pages, ensuring they receive the appropriate user experience. This feature is particularly beneficial for managing multiple currencies, like ours. Additionally, integrating it into your Webflow website is straightforward and seamless.

Vickie

Vickie Graham

star image
June 15, 2024

Really appreciate this tool for managing global e-commerce redirects. I've implemented it across several Shopify sites and find it extremely useful. With this tool, you can direct users to different links based on their location and a variety of other criteria using just one link.

Charles

Charles Mckinney

star image
AUG 6, 2024

We aimed to segment specific landing pages for different geographical regions, and using the redirect feature, especially for our pricing pages, proved invaluable in accomplishing this goal. It has enabled us to effectively target and customize our landing pages based on location.

Jacob

Jacob Lee

star image
Feb 13, 2025

Trustworthy app to geolocate the delivery goods. Its a great app which helps to locate the delivery goods throughout the whole process without any issue. Its like a trustworthy friend taking care and updating you about the products being delivered.

Kanishka

Kanishka T.

star image
OCT 25, 2024

Best geo marketing tool for WordPress website. GeoPlugin is a useful plugin for geographic info, Google maps, and Geotags. It's easy to use in Wordpress. It is also very useful for E-commerce websites displaying local currency

Vikas

Vikas K

star image
Nov 28, 2023

Great tool for website personalisation. It's free to use and really easy to set up. They have great instructions on their website.

Hunter R.

Hunter R.

star image
Apr 8, 2024

Using Geo targeting enables us to direct our international customers to tailored pages, ensuring they receive the appropriate user experience. This feature is particularly beneficial for managing multiple currencies, like ours. Additionally, integrating it into your Webflow website is straightforward and seamless.

Vickie

Vickie Graham

star image
June 15, 2024

Really appreciate this tool for managing global e-commerce redirects. I've implemented it across several Shopify sites and find it extremely useful. With this tool, you can direct users to different links based on their location and a variety of other criteria using just one link.

Charles

Charles Mckinney

star image
AUG 6, 2024

We aimed to segment specific landing pages for different geographical regions, and using the redirect feature, especially for our pricing pages, proved invaluable in accomplishing this goal. It has enabled us to effectively target and customize our landing pages based on location.

Jacob

Jacob Lee

star image
Feb 13, 2025

Trustworthy app to geolocate the delivery goods. Its a great app which helps to locate the delivery goods throughout the whole process without any issue. Its like a trustworthy friend taking care and updating you about the products being delivered.

Kanishka

Kanishka T.

star image
OCT 25, 2024

Best geo marketing tool for WordPress website. GeoPlugin is a useful plugin for geographic info, Google maps, and Geotags. It's easy to use in Wordpress. It is also very useful for E-commerce websites displaying local currency

Vikas

Vikas K

star image
Nov 28, 2023

Great tool for website personalisation. It's free to use and really easy to set up. They have great instructions on their website.

Hunter R.

Hunter R.

previous slide button
next slide button

GeoPlugin Pricing

You can integrate our geolocation PHP script for a large number of requests at competitive rates.

  • Get started in minutes
  • No credit card required
  • Free on-boarding support
All plans include
  • Country, state & city data
  • Latitude / Longitude data
  • Currency & calling code data
  • Enterprise geo IP accuracy
  • Use on unlimited domains
  • Unlimited API instances
  • Use quota for other products
  • Integration support
  • Upgrade anytime
  • Pay by invoice

FAQs

Yes, the PHP get location from IP service is free for up to 120 requests/minute.

Yes, you can use it for any project that complies with our Acceptable Use Policy

To request a new feature, reach out via our contact page.

The free usage has a 120 request/minute limit, while the paid version allows 2 million daily requests.

You can make 120 requests/minute on the free version and up to 2 million daily requests on the paid subscription

GeoPlugin Related Services

At GeoPlugin, we provide a wide range of geolocation services. Here are some additional services that we can offer to improve your users' interaction with the site.

Online Currency Converter

Most users strive for a personalized experience. Our service converts currencies in real time so that they can get the up-to-date information once they enter the site.

Javascript Geolocation

We provide a robust solution for visitor location detection that lets you design dynamic frontend features.

JSON Geolocation

If you work with the backend, our product will also be essential. It transmits user information in the right manner, facilitating its straightforward integration into your apps.

ASP Geolocation

ASP service may be another beneficial option to turn to. You can quickly add the features you require, setting up a few basic lines of code.

Reverse Geocoding

This solution can transform GPS coordinates into user-friendly address data. It helps to improve your engagement with the resource.

CSV Geolocation

If you intend to process data in the form of CSV files, we provide the appropriate API. It enables you to work with massive amounts of data and move it across several platforms.

XML Geolocation

For complex integrations, we provide geolocation data in structured XML format. With it, you can access flexibility in information processing.

Web Service API (SSL/HTTPS)

The security of user data is our priority. Therefore, all our services support an encrypted SSL via HTTPS connection.

Didn't find what you were looking for? We are ready to listen to your suggestions and become even better!
Start in just a few clicks
Get Started
capterra rating Geoplugin
rating starts
google rating Geoplugin
rating starts
google rating Geoplugin
rating starts