Any help is greatly appreciated!
Im trying to load a script once, then use the variable $country_code a couple of times on each page. Heres the script:
$gi = geoip_open(“GeoIP.dat”,GEOIP_STANDARD);
$country_code = geoip_country_code_by_addr($gi, $_SERVER['REMOTE_ADDR']);
Where do I put this code in Genesis? How do I make sure that I can use the variable $country_code (without having to load the script over and over)?
I browsed around on the net last night to come up with solutions, and I found something about using session_start() or cookies, but I can`t get it to work...
And lastly, how will the speed of my website suffer by using PHP in posts and pages vs. JS?
Closing this topic, as it was marked as "resolved"
The topic ‘session_start() or cookie?’ is closed to new replies.
Subscribe to get early access to new themes, discounts and brief updates about what's new with StudioPress!