InternetPostRequest
- sends HTTP Post request to Internet web resource (URL)

File Input/Output functions
(AFL 4.30)


SYNTAX InternetPostRequest(''http://url_to_your_web_resource'', data, flags = 0)
RETURNS HANDLE
FUNCTION The function sends URL-encoded data via HTTP Post request to the specified URL and returns a special file handle to be used by InternetReadString/InternetClose functions. It allows to open any web page or REST API service.
EXAMPLE ih = InternetPostRequest( "http://server_name_here.com/testpost.php?param3=7&m4=8", /*POST DATA*/ "param1=9&m2=12" );

if( ih )
{
    while( ( str = InternetReadString( ih ) ) != "" )
    {
       printf( "%s", str );
    }
   
    InternetClose( ih );
}


// testing code (server side ) in PHP:

<?php

echo "Post variables: \r\n";

foreach ($_POST as $key => $value){
   echo "{$key} = {$value} \r\n";
}

echo "Get variables: \r\n";

foreach ($_GET as $key => $value){
   echo "{$key} = {$value} \r\n";
}

?>
SEE ALSO InternetClose() function

References:

The InternetPostRequest function is used in the following formulas in AFL on-line library:

More information:

Updated on-line reference