The PHP method requires a single PHP file to be loaded in your site and then you can include that file to get access to the SnagCity object to place code anywhere on your site.
First, you download the snagcity.zip file, unzip and put the snagcity.php file in the root folder of your site. Next, update the file to include your license key.
<?php //authentication $licenseKey = 'YOUR_KEY_HERE'; ...
Then, you include the snagcity.php file in your code and use the snagCity object to display city information on your site.
<?php include_once('snagcity.php'); ?> <!DOCTYPE html> <html> <head> <title>SnagCity PHP Example</title> </head> <body> <h1>You're from <?php echo $snagCity->city; ?></h1> </body> </html>
Get your license key