SA-MP Forums Archive
[Include] ******* Streamer - 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: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] ******* Streamer (/showthread.php?tid=370450)

Pages: 1 2


Re: ******* Streamer - richardcor91 - 12.04.2013

Michaled: try something like this in the php side:
Код:
<?php
$videoid = $_GET['videoid'];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "youtump3.com/?v=".$videoid);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$infolink = curl_exec($ch);
curl_close($ch);

$s = strpos($infolink, "http://youtump3.com/pop/popads.php?url=");
$e = strpos($infolink, "\">", $s + 39);
$r = substr($infolink, $s + 39, $e - $s - 39);
header("Content-Type: audio/mpeg");
header("Content-Disposition: attachment; filename=".$r); 
readfile($r); 
?>
Worked?


Re: ******* Streamer - Michalec - 12.04.2013

Not working. Maybe this is my hosting problem? Can someone try if it work on yours hosting?


Re: ******* Streamer - Edvin - 12.04.2013

@Nightmare[TR], have you fixed the problem, what caused that crash on linux (server/host) at usrb1n's include?


Re: ******* Streamer - richardcor91 - 12.04.2013

Quote:
Originally Posted by Michalec
Посмотреть сообщение
Not working. Maybe this is my hosting problem? Can someone try if it work on yours hosting?
It works for me. Try this one:

Код:
format(mp3link, 128, "http://mwrserver.com/*******.php?videoid=%s", videoid);



Re: ******* Streamer v1.2 - Tamer - 12.04.2013

Nice


Re: ******* Streamer - Michalec - 12.04.2013

Quote:
Originally Posted by richardcor91
Посмотреть сообщение
It works for me. Try this one:

Код:
format(mp3link, 128, "http://mwrserver.com/*******.php?videoid=%s", videoid);
Heh. On your hosting works. On my worked, but now i don't know why don't work. cURL returns error page from *******-mp3.org .

//Edit. I think i have little problem with hosting. Now works perfect :P


Re: ******* Streamer - richardcor91 - 12.04.2013

Quote:
Originally Posted by Michalec
Посмотреть сообщение
Heh. On your hosting works. On my worked, but now i don't know why don't work. cURL returns error page from *******-mp3.org .

//Edit. I think i have little problem with hosting. Now works perfect :P
Nice man!


Re: ******* Streamer - RandomDude - 21.04.2013

Quote:
Originally Posted by richardcor91
Посмотреть сообщение
It works for me. Try this one:

Код:
format(mp3link, 128, "http://mwrserver.com/*******.php?videoid=%s", videoid);
That works perfecto!


Re: ******* Streamer - RandomDude - 22.04.2013

pawn Код:
stock *******StopStreamForPlayer(playerid)
{
        StopAudioStreamForPlayer(playerid);
        return 1;
}
Dude you should add that to your .inc so it stops the music for the player whos listening to it only and wants to stop it etc..
pawn Код:
CMD:stopmusic(playerid,params[])
{
         StopAudioStreamForPlayer(playerid);
         return 1;
}



Re: ******* Streamer - pWesley - 22.04.2013

Or use on top:

pawn Код:
#define StopAudioStreamForPlayer(playerid) Stop*******Streamer(playerid)