Hi I have some PHP script that show country flag based on visitors ip
flags.php
<?
require 'ip.php';
$ip=$_SERVER['REMOTE_ADDR'];
$two_letter_country_code=ip_info("$ip", "Country Code");
//header('Content-type: image/gif');
$file_to_check="flags/$two_letter_country_code.gif";
if (file_exists($file_to_check)){
print "<img src=$file_to_check width=30 height=15><br>";
}
else{
print "<img src=flags/noflag.gif width=30 height=15><br>";
}
Then in my index page I did
index.php
<img src="http://ip.dxing.si/flags/flags.php">
When I run the script alone it shows flag just fine, but when I want to show it on another page it doesn't work.
Here is the script and here is index page with broken image.