a HTTP function - 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: a HTTP function (
/showthread.php?tid=177268)
a HTTP function -
tbx - 17.09.2010
Hi, i tryed a new function HTTP and it doesn't work
I have code this way
Code:
public OnGameModeInit()
{
HTTP(0,HTTP_GET,"i-fair.eu/test.txt","","GetHostnameFromServer");
return 1;
}
forward GetHostnameFromServer(response_code,data[]);
public GetHostnameFromServer(response_code,data[])
{
if(response_code == 200)
{
printf("Content : %s",data);
} else printf("Failure ! Reason = %d",response_code);
return 1;
}
not any error etc.
It prints in console "Failure ! Reason = 0" what is bad guys ?
Re: a HTTP function -
tbx - 17.09.2010
SOLVED >i did readed VERY bad tutorial