Lambda Geotargeting Script - PHP Geo-targeting script
Contact
Contact Lambda Geotargeting Script by AIM
evanlambda3
Contact Lambda Geotargeting Script by Gmail
evanlambda@gmail.com
Lambda Geotargeting Script is a script to target the physical location of your visitors

Lambda Geotargeting Script is a fully self-hosted geo-targeting script that you can use on your website to determine the geographic location of your visitors. In addition to that, you can determine if a user is on a mobile device, a bot, or using a satellite connection.

You can also forward users to different pages based on their continent, country, region, or city.

All of the features can be used on your site with just 1 line of code in PHP.

Lambda Geotargeting Script does not "phone home", load remote content, or communicate with any other server. It is secure and fully self hosted.

Quantity
IP54.234.42.16
ContinentNA
CountryUnited States
Latitude38
Longitude-97
MobileNo
Satellite CarrierNo
Function List How do I...?
How Do I...?
Buy Lambda Geotargeting Script?
Install Lambda Geotargeting Script?
Activate a domain?
Forward a user based on location?
Display the location in a particular format?
Display the region if the user is in the United States, and the country otherwise?
Determine if the user is on a mobile device?
Determine if the user is a bot?
Determine if the postal code, ISP, or area code has been detected?
Create complex rules for forwarding?
Function List
function set_ip($new_ip)
function format($format)
function forward_country($country_code, $location)
function forward_continent($continent_check, $location)
function forward_region($region, $location)
function forward_city($city, $location)
function continent()
function country()
function country_code()
function city()
function region()
function postal_code()
function area_code()
function latitude()
function isp()
function longitude()
function city_found()
function region_found()
function country_found()
function isp_found()
function postal_code_found()
function area_code_found()
function is_satellite()
function is_mobile()
function is_bot()
function closest_city($format, $population)
How Do I...? Answered
Buy Lambda Geotargeting Script?

To buy Lambda Geotargeting Script simply click on the "Buy Now" PayPal logo in the orange box. Once you have paid for the product simply enter your email on the register page to create your account. Once you have an account you can log in and generate the activation codes for new domains.

Install Geotargeting Script?

Once you have purchased Lambda Geotargeting Script and logged in, there is a link to download the script and the database. Download these files to your computer and then upload both of them to the same directory on your website.

Once you have done that, point your browser to the PHP install script you uploaded. Here you will enter the database details and your activation code for that domain. After you have checked that you have entered the details correctly (there is a built in tool to verify your activation code and database details are correct), click the "install" button. The installer will automatically unzip the database and begin installing it. Since the database is large (unzipped it is a few hundred megabytes) the installer will break it down into smaller jobs. If there are errors during the install, simply press the install button again. If problems persist please contact me at evanlambda@gmail.com.

After the installation has completed successfully, make sure to delete installer script for security purposes. Now you can simply include the script in your PHP or javascript (ex: require("/myscripts/<geotarget script>.php"); in PHP) and you are ready to use Lambda Geotargeting Script.

Activate a domain?

To activate a domain, login and simply enter the domain and press "Generate Code". The code will appear next to the domain below. Note that you will need to use a different code for each subdomain (carl.mydomain.com and fred.subdomain.com will need different codes). Also note that the www portion is ignored so you can usethe same code for www.mysite.com and mysite.com.

Forward a user based on location?

There are special functions in Lambda Geotargeting Script to forward a user based on their location. Take the following script:


<?php


forward_region("Georgia", "http://mysite.com/georgia.html");
forward_region("Florida", "http://mysite.com/florida.html");
forward_country("US", "http://mysite.com/us.html");
forward("http://mysite.com/everyone-else.html");

?>

This script will look to see if the user is from Georgia first, then Florida, then anyone else in the United States, and then anyone else not in those places will be forwarded to a catch all.

Display the location in a particular format?

The function format() is your friend. Here is an example if its usage:

echo format("You are in %city, %region, %country");

Will return:

You are in Chicago, Illinois, United States

For someone living in Chicago. For my variables you can use in the format, look at the function usage.

Display the region if the user is in the United States, and the country otherwise?

<?php


if (country() == "US") {
echo format("%city, %region");
} else {
echo format("%city, %country");
}
?>

Determine if the user is on a mobile device?

<?php


if (is_mobile()) {
echo "User is on a mobile device";
} else {
echo "User is not on a mobile device";
}
?>

Determine if the user is a bot?

<?php


if (is_bot()) {
echo "User is a Bot";
} else {
echo "User is not a Bot";
}
?>

Determine if the postal code, ISP, or area code has been detected?

<?php


if (postal_code_found()) {
echo "Postal code found";
} if (isp_found()) {
echo "ISP found";
} if (area_code_found()) {
echo "Area code found";
}
?>

Create complex rules for forwarding?

You can be as creative as you want with forwarding. Here is an example that forwards a user based on what hemisphere they are in:

<?php


if (latitude() > 0) {
forward("mysite.com/northern-hemisphere.html");
} else {
forward("mysite.com/southern-hemisphere.html");
}
?>

Functions
function set_ip Manually set the IP Address for geo targetting. (Note that the user's IP Address is automatically detected by Lambda Geotargeting Script. Setting the IP manually can be useful in special circumstances)
function format($format) Print the user's geo information in the following format. The following strings within the format will be replaced with their value:

%code - The user's country code (Ex: US for United States)
%country - The full name of the user's country
%region - The user's region (Ex: California or Quebec)
%city - The user's city
%lat - The latitude of the user's city
%long - The longitude of the user's city
%postal - The postal code for the user's area
%areacode - The area code for the user's area (United States Only)
%isp - The user's ISP
function forward_country($country_code, $location)
Forward a user to a given address based on their country. (Note: This is based on the country code, not the full name of the country)
function forward_continent($continent_check, $location)
Forward a user to a given address based on their continent. (NA - North America, SA - South America, AS - Asia, AF - Africa, EU - Europe, OC - Australia and Oceania)
function forward_region($region, $location)
Forward a user to a given address based on their region. (This is based on the full region name, Ex: Oregon)
function forward_city($city, $location)
Forward a user to a given address based on their city.
function continent()
Returns the user's continent code.
function country()
Returns the full name of the user's country.
function country_code()
Returns the user's country code.
function city()
Returns the user's city. (Blank if not found)
function region()
Returns the user's region. (Blank if not found)
function postal_code()
Returns the user's postal code. (Blank if not found)
function area_code()
Returns the user's area code. (Blank if not found)
function latitude()
Returns the user's city's latitude.
function isp()
Returns the user's ISP.
function longitude()
Returns the user's city's longitude.
function city_found()
Returns true if the city was detected, false if not.
function region_found()
Returns true if the region was detected, false if not.
function country_found()
Returns true if the country was detected, false if not.
function isp_found()
Returns true if the user's ISP was detected, false if not.
function postal_code_found()
Returns true if the postal code was detected, false if not.
function area_code_found()
Returns true if the area code was found, false if not.
function is_satellite()
Returns true if the user is using a satellite based ISP, false if not.
function is_mobile()
Returns true if the user is on a mobile device, false if not.
function is_bot()
Returns true if the user identifies itself as a bot, false if not.
function closest_city($format, $population)
Returns the closest city (In the format specified) of a given population. The following variables in the format are replaced with the appropriate values:

%code - The user's country code (Ex: US for United States)
%country - The full name of the user's country
%region - The user's region (Ex: California or Quebec)
%city - The user's city
%lat - The latitude of the user's city
%long - The longitude of the user's city
%lat - The latitude of the user's city
%long - The longitude of the user's city
%distance - The approximate distance (in miles) of the closest city from the detected city