HTTP ? - 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 ? (
/showthread.php?tid=274311)
HTTP ? -
dud - 05.08.2011
Код:
new Testing = 5;
new string[128];
format(string, sizeof(string), "test=%i", Testing);
HTTP(playerid, HTTP_POST, "localhost/test/test.php", string, "MyHttpResponse");
When i start server at home it work and post data to php
but when i put it on host it not posting data to php file WHY
Re: HTTP ? -
MadeMan - 05.08.2011
I guess the second one, but not sure.
Re: HTTP ? -
dud - 06.08.2011
bump
Re: HTTP ? -
[MG]Dimi - 06.08.2011
I would also say Second one, seems it has the most correct format usage
Re: HTTP ? -
dud - 06.08.2011
ok its work but now i have another problem
everting is working fine when i run server at home but when i put my gamemode on host HTTP function not post data why ?
home i use windows on host is linux this can be problem ?
Re: HTTP ? -
MadeMan - 06.08.2011
Do you have the .php file in your host?
Re: HTTP ? -
dud - 06.08.2011
yes i have
Re: HTTP ? -
dud - 06.08.2011
it's possible my gamehost to block http function to post data ?
Re: HTTP ? -
[MG]Dimi - 06.08.2011
try replacing this:
PHP код:
HTTP(playerid, HTTP_POST, "localhost/test/test.php", string, "MyHttpResponse");
into this:
PHP код:
HTTP(playerid, HTTP_POST, ".../test/test.php", string, "MyHttpResponse");
Maybe it works because Online hostings use ... to define server directory
Re: HTTP ? -
dud - 06.08.2011
i am not posting data on same host where is my server i post it on another host
HTTP(playerid, HTTP_POST, "www.myhost.com/test/test.php", string, "MyHttpResponse");
it's possible my gamehost to block sa-mp http function to post data ?