SA-MP Forums Archive
HTTP_GET throws Bad_Host Error - 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)
+--- Thread: HTTP_GET throws Bad_Host Error (/showthread.php?tid=595668)



HTTP_GET throws Bad_Host Error - BiosMarcel - 06.12.2015

Hey,

I am trying to do a simple Request but it seems like i can't even connect to the server, i have already tried it with a local server and with a non local server, it just won't work.
I already tried deactivating my firewall but that's also useless, anyways that shouldn't be necessary since i tried it on localhost and the file permissions are also correct.
Does anyone know what the problem could be?
I guess u don't need any code here but still here:

PHP код:
HTTP(1,HTTP_GET"ftp://user1@127.0.0.1/nope.txt""""MyHttpResponse"); 
greetings Marcel


Re: HTTP_GET throws Bad_Host Error - Calgon - 06.12.2015

The clue is in the name - the function is called HTTP, not FTP...


Re: HTTP_GET throws Bad_Host Error - BiosMarcel - 06.12.2015

i also tried it with http ^^

PHP код:
    HTTP(1,HTTP_GET"http://noscams.bplaced.net/nope.html""""MyHttpResponse"); 
but that didnt work so i tried it directly per ftp


Re: HTTP_GET throws Bad_Host Error - Calgon - 06.12.2015

Take a look at how it's used: https://sampwiki.blast.hk/wiki/HTTP

url[] The URL you want to request. (Without 'http://')


Re: HTTP_GET throws Bad_Host Error - BiosMarcel - 06.12.2015

if you mean that i try it with a .html file i also tried that with .txt and the "playerid" is just a number u can user any number, so if u know the mistake , tell me cuz i can't see it


Re: HTTP_GET throws Bad_Host Error - BiosMarcel - 06.12.2015

never mind, now i got it, it was the "http://"

thanks man