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?
The topic ‘session_start() or cookie?’ is closed to new replies.
Are you a blogger, web designer, developer, or website owner looking to generate more income?
Promote products for the largest and fastest growing online website platform as part of our affiliate program.