26 Replies Latest reply on Dec 7, 2010 3:03 AM by 123polis123

    cookies by cfm may retrieved by php

    123polis123 Level 1

      cookies 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="0" height="0" style=" border:none"></iframe>


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




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

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


      $linkid = mysql_connect($hostname,$username,$password);
      @mysql_select_db($database,$linkid) or die( "Unable to select database");
      $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