SA-MP Forums Archive
Can sa-mp HTTP function be blocked ? - 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: Can sa-mp HTTP function be blocked ? (/showthread.php?tid=274902)



Can sa-mp HTTP function be blocked ? - dud - 07.08.2011

ok i'am using http function to post data on php
when i start server at home (windows 7) everyting work fine and i get posted data from sa-mp http function to php
then i upload my gamemode on host and start server http function not sending data tu php .

i use same url at http function

What can be problem ?
can my gamehost to block samp http function ti send data ti php file(which is on another host)?


Re: Can sa-mp HTTP function be blocked ? - dowster - 07.08.2011

maybe the server your sending the data too is blocking it, have you tried sending the same data using a web browser to the server?


Re: Can sa-mp HTTP function be blocked ? - dud - 07.08.2011

how do you think with a web browser send data to the server?
i need a basic example


Re: Can sa-mp HTTP function be blocked ? - MadeMan - 07.08.2011

Try the GET method?


Re: Can sa-mp HTTP function be blocked ? - dud - 07.08.2011

yes i tried now and not work :@


Re: Can sa-mp HTTP function be blocked ? - dowster - 07.08.2011

same way your using the http function in samp...
for example
https://sampforum.blast.hk/showthread.php?tid=274902
that is sending the data t=274902 to the server, and the server is rendering an html for the thread 274902 and sending it back to the client


Re: Can sa-mp HTTP function be blocked ? - dud - 07.08.2011

here is my script
Код:
#include <a_samp>
#include <a_http>

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

public OnFilterScriptInit()
{
	HTTP(0, HTTP_POST, "mysite.com/test.php", "Name=Jony_Dude&Score=1", "HTTPX");
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}

public HTTPX(index, response_code, data[])
{
    printf("Response code: %d", response_code);
    return 1;
}
you think this to put in web browser ?
Код:
mysite.com/test.php?Name=Jony_Dude&Score=1



Re: Can sa-mp HTTP function be blocked ? - dowster - 07.08.2011

yeah


Re: Can sa-mp HTTP function be blocked ? - linuxthefish - 07.08.2011

Your host could be blocking port all ports except the ones for SA-MP, in and out.


Re: Can sa-mp HTTP function be blocked ? - dud - 07.08.2011

not work why ?

but this method work

Код:
<html>
<head>
<title>TEST</title>
</head>
<body>
<form action="http://mysite.com/test.php" method="post">
Please enter your name: <input name="Name" type="text" />
<input type="submit" name="submit" value="Submit your name">
</form>
</body>
</html>



Re: Can sa-mp HTTP function be blocked ? - dud - 09.08.2011

anyone know why not work on host?