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.
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.
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.
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.
The function format() is your friend. Here is an example if its usage:
echo format("You are in %city, %region, %country");For someone living in Chicago. For my variables you can use in the format, look at the function usage.
<?php
if (country() == "US") {
echo format("%city, %region");
} else {
echo format("%city, %country");
}
?>
<?php
if (is_mobile()) {
echo "User is on a mobile device";
} else {
echo "User is not on a mobile device";
}
?>
<?php
if (is_bot()) {
echo "User is a Bot";
} else {
echo "User is not a Bot";
}
?>
<?php
if (postal_code_found()) {
echo "Postal code found";
} if (isp_found()) {
echo "ISP found";
} if (area_code_found()) {
echo "Area code found";
}
?>
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");
}
?>