www.webdeveloper.com
Results 1 to 3 of 3

Thread: How is server receive request

  1. #1
    Join Date
    Oct 2009
    Posts
    2

    How is server receive request

    Hello all,
    I writing a website, it has a function that it will receive request from a application program. When the program sent request to
    it, it will receive request and parser request content then sent again response to the program. But I don't know website will listen request and receive request. Can you help me?
    I trying to use $_POST in website to listen and receive request from the program but no success.
    My code:
    foreach ($_POST as $key => $value)
    {
    echo "$_POST";
    }
    Thanks,

  2. #2
    Join Date
    Nov 2008
    Posts
    2,477
    You probably mean something like this:

    PHP Code:
    foreach ($_POST as $key => $value) {
        echo 
    "$key$value";

    Or even just:

    PHP Code:
    printf("<pre>%s</pre>"print_r($_POSTtrue)); 
    If you echo $_POST directly PHP will just print the word Array rather than divulge the contents.

  3. #3
    Join Date
    Oct 2009
    Posts
    2
    Thanks MindZai
    I sent data from application program that i write by actionscript, it will sent request which is a text file to my webserver,
    Code of it is :
    var request:URLRequest = new URLRequest( "http://wcc.dyndns.org/ppListen/pp-lis.php" );

    // Create some variables to send
    var user:String = "admin";
    var pass:String = "123456";
    var variables:URLVariables = new URLVariables();
    variables.someText = "user_active:" + user + ", pass_active:" + pass;
    request.data = variables;
    sendToURL(request);
    request.method = URLRequestMethod.POST


    I want my webserver will receive text file and parser it to response to application software. Above, I only echo "$_POST" to test webserver received request content, but it show nothing
    I can't how i should process it to receive the request.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles