echo "hello world" | ./modharbour test.prg
whatever is written there ("hello world") becomes the AP_Body() from modharbour
#include <stdio.h>
#include <string.h>
int main( int args, char * argv[] )
{
char buffer[ 250 ];
memset( buffer, 0, sizeof( buffer ) );
read( fileno( stdin ), buffer, sizeof( buffer ) - 1 );
printf( "%s\n\n", "Content-Type: text/html;" );
printf( "%s", buffer );
return 0;
}
function Main()
? FReadStr( hb_GetStdIn(), 256 )
return nil
Users browsing this forum: No registered users and 2 guests