sa-mp HTTP( data[]..
#2

Well I just tried this and it worked fine

pawn Код:
#include <a_samp>
#include <a_http>

forward HTTPX(index, response_code, data[]);

main()
{
    HTTP(0,HTTP_POST, "127.0.0.1/test.php", "var=value&another=value2", "HTTPX");
}

public HTTPX(index, response_code, data[])
{
    printf("Response code: %d, Data: %s", response_code, data);
    return 1;
}
Test.php contents
PHP код:
<?php

print_r
($_POST);

?>
Output:

Код:
Response code: 200, Data: Array
(
    [var] => value
    [another] => value2
)
Hope this helps, thanks to Popz for giving me additional advice, as I wasn't sure myself
Reply


Messages In This Thread
sa-mp HTTP( data[].. - by maij - 09.04.2011, 15:53
Re: sa-mp HTTP( data[].. - by JaTochNietDan - 09.04.2011, 16:54
Re: sa-mp HTTP( data[].. - by maij - 09.04.2011, 16:58

Forum Jump:


Users browsing this thread: 1 Guest(s)