Things to do with the HTTP function
#4

That is GET data, so all you have to do is this:

pawn Code:
HTTP(playerid, HTTP_GET, "http://linuxthefish.net/mail.php?to=&subject=Hello&message=This", "", "MailResponse");

public MailResponse(index, response_code, data[])
{
    SendClientMessage(index, 0xFFFFFF, "You sent the email");
    printf("Response code: %d", response_code); // The response code is what the page responded with...200, 404, 500 etc.
    printf("Page returned: %s", data); // data contains the information that was on the page
    return 1;
}
Hope that simple example helps!

Note: That link you pasted wouldn't be passing all of the GET data you are intending, the first identifier is the ? symbol which is followed by the first GET variable and its value, to add additional ones, you need to use the & identifier.
Reply


Messages In This Thread
Things to do with the HTTP function - by Luis- - 08.08.2011, 23:12
Re: Things to do with the HTTP function - by JaTochNietDan - 08.08.2011, 23:38
Re: Things to do with the HTTP function - by linuxthefish - 09.08.2011, 00:18
Re: Things to do with the HTTP function - by JaTochNietDan - 09.08.2011, 00:22
Re: Things to do with the HTTP function - by dowster - 09.08.2011, 00:23
Re: Things to do with the HTTP function - by JaTochNietDan - 09.08.2011, 00:25
Re: Things to do with the HTTP function - by linuxthefish - 09.08.2011, 00:44
Re: Things to do with the HTTP function - by Luis- - 09.08.2011, 01:05
Re: Things to do with the HTTP function - by dowster - 09.08.2011, 01:20
Re: Things to do with the HTTP function - by JaTochNietDan - 09.08.2011, 01:24

Forum Jump:


Users browsing this thread: 3 Guest(s)