Please help why doesn't this string print to network I treid everything..... Even wrote a new SQL....... The problem is its suppose to print the network file to the table in ibwf_users called subno but it doesn't.... It calls the table from the SQL but doesn't print the answer back to users why.....
function iptocountry($ip) {
$numbers = preg_split( "/\./", $ip);
include("../ip_files/".$numbers[0].".php");
$code=($numbers[0] * 16777216) + ($numbers[1] * 65536) + ($numbers[2] * 256) + ($numbers[3]);
foreach($ranges as $key => $value){
if($key<=$code){
if($ranges[$key][0]>=$code){$two_letter_country_code=$ranges[$key][1];break;}
}
}
if ($two_letter_country_code==""){$two_letter_country_code="Unknown";}
return $two_letter_country_code;
}
function country_name($two_letter_country_code)
{
include("../ip_files/countries.php");
$country_name=$countries[$two_letter_country_code][0];
return $country_name;
}
function show_flag($two_letter_country_code)
{
$file_to_check='../ip_flags/'.strtolower($two_letter_country_code).'.gif';
if (file_exists($file_to_check)){
$FLAG= '<img src="'.$file_to_check.'" alt="'.$two_letter_country_code.'"/>';
}else{
$FLAG= '<img src="../ip_flags/noflag.gif" alt="'.$two_letter_country_code.'"/>';
}
return $FLAG;
}
//////////////////////Operator theyr using?
function ip()
{
if($_SERVER["REMOTE_ADDR"]){$ip=$_SERVER["REMOTE_ADDR"];}
else{$ip=$_SERVER["HTTP_X_FORWARDED_FOR"];}
if(strpos($ip,",")){
$exp_ip=explode(",",$ip);
$ip=$exp_ip[0];
}
return $ip;
}
function ipinrange($ip, $range1, $range2)
{
$ip=ip2long($ip);
$range1=ip2long($range1);
$range2=ip2long($range2);
return (($ip >= $range1) && ($ip <= $range2));
}
function network($ip,$opt)
{
$result=mysql_query("SELECT * FROM djb_network ORDER BY subone, subtwo");
while($ranges=mysql_fetch_array($result)){
if(ipinrange($ip, $ranges[1], $ranges[2])){
if(is_file("../flags/".$ranges["flag"])&&$opt==1){
$flag="<img src=\"../flags/".$ranges["flag"]."\" alt=\"".$ranges["flag"]."\"/><br/>";
}
return $flag.$ranges["isp"]." ".$ranges["country"];
}
}
}
BakGat
class Counter {
public:
void Count();
int ReadDisplay();
private:
int CurrentCount;
};
External image (may be gone) External image (may be gone) External image (may be gone)
Back up my hard drive? How do I put it in reverse? http://www.hackthissite.org Profile…