HTTP gives me response code 1
#1

WHy does it give response code 1(Bad host) to the http callback? I tried to paste this link to the browser and it works
pawn Код:
HTTP(playerid, HTTP_GET, "http://ultrabee.dlinkddns.com:7775/live", "", "PlayRadio");

pawn Код:
forward PlayRadio(playerid, response_code, const data[]);
public PlayRadio(playerid, response_code, const data[])
{
printf("%d",response_code);//this gives to the server console the response code(always 1)
    if(response_code == 200)
    {
        //Yes!
        PlayAudioStreamForPlayer(playerid,"http://ultrabee.dlinkddns.com:7775/live");
        SendClientMessage(playerid, COLORE_BIANCO,"{00ff00}Our radio is online! You started to listen to it!");
    }
    else
    {
        //Yes!
        SendClientMessage(playerid, COLORE_BIANCO,"{ff0000}Our radio is offline!");
    }
}
Reply
#2

https://sampwiki.blast.hk/wiki/HTTP
HTTP_ERROR_BAD_HOST
Reply
#3

Quote:
Originally Posted by Vince
Посмотреть сообщение
i know that this is "bad host", but how to fix it?
Reply
#4

I think you're just using it wrong. What sort of information is an mp3 file supposed to be returning? Talking about the HTTP_GET
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)