HTTP_POST Problem - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: HTTP_POST Problem (
/showthread.php?tid=196514)
HTTP_POST Problem -
corne - 05.12.2010
Im making a little FS for vandex.
But it doesnt work. Can anyone help me?
Command to send data:
pawn Код:
if (strcmp("/offical", cmdtext, true, 10) == 0)
{
if(IsPlayerAdmin(playerid))
{
GetPlayerName(playerid, pName, sizeof(pName));
GetPlayerIp(playerid, uip, sizeof(uip));
format(string, sizeof(string), "%s(IP: %s) asked for Legal Vandex License", pName, uip);
HTTP(playerid, HTTP_POST, "icorne.one2xs.com/vandex.txt", string, "MyHttpResponse");
}
return 1;
}
When i do the command ingame it just Says: "The request failed! The response code was: 6".
I searched on forum but did not found a topic that helped me.
AW: HTTP_POST Problem -
Trooper[Y] - 05.12.2010
What you want to do with this code ?
If you want to get the source of this TXT (short for textfile),
then you surely dont need HTTP_POST !
Re: HTTP_POST Problem -
corne - 05.12.2010
I want to send
pawn Код:
GetPlayerName(playerid, pName, sizeof(pName));
GetPlayerIp(playerid, uip, sizeof(uip));
format(string, sizeof(string), "%s(IP: %s) asked for Legal Vandex License", pName, uip);
(Only the "%s(IP: %s) asked for Legal Vandex License" part) to an new line in icorne.one2xs.com/vandex.txt
AW: HTTP_POST Problem -
Trooper[Y] - 05.12.2010
As i already said,
the end "txt" gives you a little hint,that its only plain text.
They dont care for informations you want to send to them,
php files do.
Use ****** to find out,
how this works
Re: HTTP_POST Problem -
corne - 05.12.2010
What i need to search for? :S
Re: HTTP_POST Problem -
Ash. - 05.12.2010
Ive never used the HTTP functions in SAMP, but a quick look over the WIKI entry tells me that it reads / sends information over HTTP protocols - .txt files dont care about HTTP_POST data... - You could however, create a php file to write the data to that specific text file.