<?php
require'fun.php';
require'f_conectare.php';
conectare('informatii IP','informatii-ip');
$x1='';
if($go!='')
$x1=' - '.$go;
$titlu='Informații IP'.$x1;
$back[1]='<a href="/extra-meniu">'.img('extra.png',1).'Extra meniu</a>';
require'f_sus.php';
echo$div[4].'Informații IP'.$x1.$div[5];
unset($x1);
if($go!='')
{
require'f_filtrul.php';
$ch=curl_init();
curl_setopt($ch,CURLOPT_URL,'http://www.speedguide.net/ip/'.$go);
curl_setopt($ch,CURLOPT_TIMEOUT,5);
curl_setopt($ch,CURLOPT_USERAGENT,$_SERVER['HTTP_USER_AGENT']);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch,CURLOPT_BINARYTRANSFER,true);
curl_setopt($ch,CURLOPT_VERBOSE,false);
curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,FALSE);
curl_setopt($ch,CURLOPT_SSLVERSION,3);
curl_setopt($ch,CURLOPT_SSL_VERIFYHOST,FALSE);
curl_setopt($ch,CURLOPT_FRESH_CONNECT,1);
curl_setopt($ch,CURLOPT_FORBID_REUSE,1);
$output=curl_exec($ch);
curl_close($ch);
$output=filtrul($output,'<table class="t1 ip-info" style="width: 100%;">','</table>');
$isp=filtrul($output,'<td class="variable">ISP: </td><td>','</td>');
$organizatie=filtrul($output,'<td class="variable">Organization: </td><td>','</td>');
$oras=filtrul($output,'<td class="variable">City: </td><td>','</td>');
$regiune=filtrul($output,'<td class="variable">Region: </td><td>','</td>');
$tara=str_replace(['src="/','style="margin: 0 0 -2px 0;"'],['src="http://www.speedguide.net/','/'],filtrul($output,'<td class="variable">Country: </td><td>','</td>'));
$latitudine=filtrul($output,'<td class="variable">latitude: </td><td>','</td>');
$longitudine=filtrul($output,'<td class="variable">longitude: </td><td>','</td>');
echo$div[1].'ISP: <strong>'.($isp!=''?$isp:'ne cunoscut').'</strong>'.$div[0].$div[1].'Organizatie: <strong>'.($organizatie!=''?$organizatie:'ne cunoscuta').'</strong>'.$div[0].$div[1].'Oras: <strong>'.($oras!=''?$oras:'ne cunoscut').'</strong>'.$div[0].$div[1].'Regiune: <strong>'.($regiune!=''?$regiune:'ne cunoscuta').'</strong>'.$div[0].$div[1].'Tara: <strong>'.($tara!=''?$tara:'ne cunoscuta').'</strong>'.$div[0].$div[1].'Latitudine: <strong>'.($latitudine!=''?$latitudine:'ne cunoscuta').'</strong>'.$div[0].$div[1].'Longitudine: <strong>'.($longitudine?$longitudine:'ne cunoscuta').'</strong>'.$div[0].($latitudine!=''&&$longitudine!=''?$div[1].'<a href="/vezi-pe-harta?latitudine='.$latitudine.'&amp;longitudine='.$longitudine.'">Vezi locatia pe harta</a>'.$div[0]:'');
unset($ch,$output,$isp,$organizatie,$oras,$regiune,$tara,$latitudine,$longitudine);
}
else
{
$form[0]='/informatii-ip" method="get';
$form[1]=1;
$form[2]=$div[1].'Introdu IP-ul pentru care dorești informatii:<br /><input name="go" value="'.$_SERVER['REMOTE_ADDR'].'" />'.$div[0];
$form[3]='go';
$form[4]='Afiseaza';
require'f_form.php';
}
require'f_jos.php';