2 Replies Latest reply on Nov 1, 2009 8:54 AM by 1advent

    httprequest works on local machine, but not server


      I created an application to send "survey" info back to a php file:


              private function send_data():void {






          <mx:HTTPService id="userRequest" url="http://www.marketingmetricsmedia.com/playground/healthSurvey.php" useProxy="false" method="POST">

              <mx:request xmlns="">






















      and the php page is:



      $content = " ";

      //$ip = getenv('REMOTE_ADDR'); //~ get ip address

      //$ip = "&ip=".$ip."&"; //~ make it a flashable variable


      foreach ($_REQUEST as $key => $value) {

      //$$key = $value;

              //$content .= $value;



      if ($key != "PHPSESSID" && $key != "logintheme" && $key != "__utma" && $key != "__utmz" && $key != "cprelogin" && $key != "cpsession")


      $content .= "$key";

      $content .= "=";

      $content .= "$value";

      $content .= "~";




      //$content .= "ip=";

      //$content .= "$ip";


      $Handle = fopen('data.txt', 'a');

      $Data = "\n";

      fwrite($Handle, $Data);

      fwrite($Handle, $content);







      This all works from Flex, and from the "bin" but it wont work when i upload it. The survey shows working but it doesnt update the data.txt file.


      I'm new to this language, so i'm sorry if this is an easy one. (or if i did something sloppy.)