lse123 0 Junior Poster in Training

cookies set by cfm may retrieved by php? if iframe have or not (other page)?

In a cfm page may insert:

<iframe src="country.php" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" width="120" height="14" style=" border:none"></iframe>

where country.php: // to get ip I used $_COOKIE set by cfm, get by php, well seems default NULL appear in country always, where error?

<?php

function getIP()
{
if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
else if (isset($_SERVER['REMOTE_ADDR'])) $ip = $_SERVER['REMOTE_ADDR'];
else $ip = “UNKNOWN”;
return $ip;
}

$ipNEW = getIP();
$IP=$ipNEW;
if ((!empty($IP)) && ($IP != "UNKNOWN")){
$country = file_get_contents('http://api.hostip.info/country.php?ip='.$IP);
} else
$country = 'unknown';

    include("pass/passwords.php");

$linkid = mysql_connect($hostname,$username,$password);
@mysql_select_db($database,$linkid) or die( "Unable to select database");
$countNumVisitor=$_COOKIE['countNumVisitor']);
$query15 = "INSERT INTO yyyy SET country='$country' WHERE countNumVisitor = $countNumVisitor";    // refURL
$result15 = @mysql_query($query15,$linkid) or die("Unable to execute query. Please try again later. line 168");  // linkid2
mysql_close($linkid);
echo $countNumVisitor."  ".$country;   // firefox shows number of visitior the:239 as cookie but printed nothing[even "iii" not printed]... needed get bigger iframe?

?>

cfml cookie set as
<cfcookie name="countNumVisitor" value="#countNumVisitor#" expires="never" >


firefox shows correct value for cookie but php do es not print it....