Har problemer med at sætte get ind i kode?!
Hej for at få denne kode til at virke siger en af mine venner der skal sættes $_GET[ ind for at få fat i nogle af variablerne eller hvad det nu heder, det virkede på min gamle server men den nye kan ikke finde ud af det uden get er der ikke nogle som vil hjælpe mig med at sætte get ind så det kommer til at virke´!!!mange tak
<?
$host = "xxx"; // database host, usually localhost
$username = "xxx"; // database username
$password = "xxx"; // database password
$database = "xxx"; // database name
$dbtablename = "xxx"; // table name
$color_normal = "255,0,0"; // color of the dots representing visitors < 100
$color_100 = "255,64,0"; // color of the dots representing 100 < visitors < 500
$color_500 = "255,96,0"; // color of the dots representing 500 < visitors < 1000
$color_1000 = "255,128,0"; // color of the dots representing 1000 < visitors
$color_current = "255,255,0"; // color of the dots the current visitor
$file = "worldmap.jpg"; // name of the map
$limit = 999999; // maximum number of visitors that is displayed
$server = mysql_connect($host, $username, $password);
$connection = mysql_select_db($database, $server);
$im = imagecreatefromjpeg($file);
$scale_x = imagesx($im);
$scale_y = imagesy($im) * 1.175;
$i = 0;
$sql = mysql_query("SELECT * FROM ".$dbtablename." LIMIT 0,".$limit);
while ($row = mysql_fetch_array($sql)){
$output[$i] = array($row['lat'], $row['long']);
$i++;
}
for ($x=0;$x<count($output);$x++){
$times= 0;
for ($y=0;$y<count($output);$y++){
if ($output[$x]['lat'] == $output[$y]['lat'] AND $output[$x]['long'] == $output[$y]['long']){
$times++;
}
}
if ($times <= 100){ $color=$color_normal; }
if ($times > 100 AND $times <= 500){ $color=$color_100; }
if ($times > 500 AND $times <= 1000){ $color=$color_500; }
if ($times > 1000){ $color=$color_1000; }
$color = explode(",", $color);
$color_n = imagecolorallocate($im, $color[0],$color[1],$color[2]);
$pt = getlocationcoords($output[$x][0], $output[$x][1], $scale_x, $scale_y);
imagefilledrectangle($im,$pt["x"]-1,$pt["y"]-1,$pt["x"],$pt["y"],$color_n);
}
if(($long != "") && ($lat != "") && ($ipaddress != "")) {
$sql = mysql_query("INSERT INTO world VALUES ( '$ipaddress', '$long', '$lat', '".date('h:i, j-m-Y')."')");
$color_current = explode(",", $color_current);
$mainColor = imagecolorallocate($im, $color_current[0], $color_current[1], $color_current[2]);
$pt = getlocationcoords($lat, $long, $scale_x, $scale_y);
imagefilledrectangle($im,$pt["x"]-1,$pt["y"]-1,$pt["x"]+1,$pt["y"]+1,$mainColor);
}
header ("Content-type: image/png");
imagepng($im);
imagedestroy($im);
function getlocationcoords($lat, $lon, $width, $height) {
$x = (($lon + 180) * ($width / 360));
$y = ((($lat * -1) + 90) * ($height / 180));
return array("x"=>round($x),"y"=>round($y));
}
?>
