26.01.2013, 11:52
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!");
}
}