[Ajuda] Como converter um parametro http
#1

http://www.*******inmp3.com/fetch/?f...?v=i62Zjga8JOM

abrindo esta pagina vc pode ver que tem 3 linhas deste API
Код:
Title: Happy Forever Alone Day (Forever Alone Song) 
Length: 125 
Link: http://www.*******inmp3.com/download/get...6w3Q%3D%3D
quero criar algo (alguma) coisa que faзa pegar esse ultimo link da pagina com formataзгo. Alguem pode dar um sinal?

Achei esta public: base Dayvison Include
Код:
public *******Response(playerid, response, data[])
{
	if(response == 200)
	{
		if(strfind(data, "No video was found") != -1 || strfind(data, "<meta http-equiv=") != -1)
		{
			#if defined OnPlay*******Url
				OnPlay*******Url(playerid, "\0", 0, -1);
			#endif
			return;
		}
		new
			title[60],
			len[5],
			Find
		;
		Find = strfind(data, "<br/>");
		strmid(title, data, 7, Find-1);
		strdel(data, 0, Find+5);

		Find = strfind(data, "<br/>");
		strmid(len, data, 8, Find-1);
		strdel(data, 0, Find+11);

		strpack(*******_title[playerid], title);
		*******_len[playerid] = strval(len);

		PlayAudioStreamForPlayer(playerid, data, *******_posX[playerid], *******_posY[playerid], *******_posZ[playerid], *******_distance[playerid], *******_usepos[playerid]);
		#if defined *******_USE_TEXTDRAW
			PlayerTextDrawSetString(playerid, *******_textdraw[playerid], title);
			PlayerTextDrawShow(playerid, *******_textdraw[playerid]);
			print("Show");
		#endif
		#if defined USE_TIMER
		*******_timer[playerid] = SetTimerEx("intern_OnStopUrl", strval(len)*1000, false, "d", playerid);
		#endif
		#if defined OnPlay*******Url
			OnPlay*******Url(playerid, title, strval(len), 1);
		#endif
	}
	else
	{
		#if defined OnPlay*******Url
			OnPlay*******Url(playerid, "\0", 0, -2);
		#endif
	}
}
mas nгo consigo entender os cуdigos
Reply


Messages In This Thread
Como converter um parametro http - by TheBob - 25.01.2017, 08:58
Programando e Relaxando - by RazorGuigo - 25.01.2017, 11:29
Re: Como converter um parametro http - by TheBob - 25.01.2017, 11:40
Re: Como converter um parametro http - by RodrigoMSR - 25.01.2017, 11:55
Re: Como converter um parametro http - by TheBob - 25.01.2017, 12:01

Forum Jump:


Users browsing this thread: 1 Guest(s)