A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: URLRequest send to Php file ....

  1. #1
    Senior Member
    Join Date
    Apr 2008
    Location
    Rotorua / New Zealand
    Posts
    117

    URLRequest send to Php file ....

    Hi there,

    Exactly the same I can do easily with Http, but I can't use Http because where I like to use it; it does not except or work with the Http.

    So what I need to find is to address a Php file other than using Http, and funny enough I can use with it the URLRequest and URLLoader which works fine, but in this case I 'ONLY' need to address (activate) a Php log file to run.

    Anybody knows if that would be possible to do 'As simple As' with the URL.... ???

    Thanks in advance aktell

    Code:
    <mx:Script>
         <![CDATA[
    
              import flash.net.*;
    
              private  function sendIt():void {
    
              var request:URLRequest = new URLRequest(http://www.[site name].net/log.php);
    
              request.method = URLRequestMethod.POST;
    
                   try {
                        sendToURL(request);
                   }
                        catch (e:Error) {
                             trace('there is an error')
                   }
              }          
         ]]>
    </mx:Script>
    Somebody suggested this: !!! But it does not seem to work either ???
    Code:
    var urlLoader:URLLoader = new URLLoader(new URLRequest("http://www.sample.com/script.php"));
    Last edited by aktell; 07-11-2010 at 04:56 PM. Reason: new attachment

  2. #2
    FK Romeo martiansam's Avatar
    Join Date
    Oct 2001
    Location
    Bombay, India
    Posts
    223
    Did you try navigateToURL()
    sameer rao

    there...you see!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center