Recommended Links

Common For all pages

This section shows you how you can have editable content which is the same throughout the site ( NOTE: It is language specific ) .All the navs below are generated using snippets that are included with the framework, edit this content to see how it was generated

Sub Nav:

Main Nav:

Footer Nav:

Unique Per Page

Geo Targeting

The 'IPLookup' Class provides functions to easily add Geo Targeting capabilities to your site.

NOTE: This uses the a Binary version of the GeoLite City database you will need to download the Binary ZIP Format version, unzip it and place the file 'GeoLiteCity.dat' under '//libs/standalone/geoip/GeoIPCity.dat', make sure its named 'GeoIPCity.dat' The reason why I am not including it allong with the framework is because the database is around 28MB in size.


//This is a controller function
function IPLookup()
  require_once '/libs/standalone/IPLookup.php';

  $contentVars = array();

  $IPLookup = new IPLookup();

  // To Get a list of all the IP addresses
  $ipAddress1 = $IPLookup->getIPsFromDomainName('');

  // To Get 1 IP address
  $ipAddress2 = $IPLookup->getIPFromDomainName('');

  $google =  '<pre>Google<br />
  '.print_r($IPLookup->lookup($ipAddress1[0]), true).'</pre>';
  $contentVars['Google'] = $google;

  $yahoo = '<pre>Yahoo
' .print_r($IPLookup->lookup($ipAddress2), true).'</pre>'; $contentVars['Yahoo'] = $yahoo; $IPLookup->close(); $this->templateVars['rightContent'] = $this->loadMainContent('libraries/geoTargeting', $contentVars); $this->display($this->templateVars); }

Site Powered by Mac's PHP MVC Framework Framework of the future
Design downloaded from Free website templates, layouts, and tools.