Jump to content


Corporate Sponsors


Latest News: (loading..)

SambaMambo

Member Since 17 Mar 2005
Offline Last Active Jun 27 2011, 10:19
-----

Posts I've Made

In Topic: Who's Online Enhancement 1.4

16 May 2011, 14:53

well, you just need to change the ip locator api
edit /admin/whos_online.php and change to this (line 160):

//Function to get IP address geolocation data from IPInfoDB and update whos_online table
function updateIps($ips){
	//Old,incesure  method
	//$d = file_get_contents("http://ipinfodb.com/ip_query2.php?ip=$ips");     
	
	//Initialize the Curl session
	$ch = curl_init();
	$URL = ("http://api.hostip.info/?ip=$ips");
	//Set curl to return the data instead of printing it to the browser.
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
	//Set the URL, then execute, then close
	curl_setopt($ch, CURLOPT_URL, $URL);
	$d = curl_exec($ch);
	curl_close($ch);

	
 
	//Use backup server if cannot make a connection
	if (!$d){
		//$backup = file_get_contents("http://backup.ipinfodb.com/ip_query2.php?ip=$ips");
		$ch = curl_init();
		$URL = ("http://api.hostip.info/?ip=$ips");