Merhaba forumda ücretsiz mp3 indirme scriptini inceldim. scriptin çalışması için popen komutu çalıştırılması gerekiyormuş. scriptte geçen kod aşağıdadır bu komutu nasıl çalıştırabilirim
$query = popen($command, "r");
$i = 3;
echo '|'.$i;
$log = '';
while($read = fgets($query, 2048))
{
if( $i < 95 )
{
$i+= rand(3,17);
}
if( $i > 100 )
{
$i = 95;
}
ob_flush(); flush();
echo '|'.$i;
sleep( rand(1,2) );
$log.= $read . "n";
}
pclose($query);
$destination = null;
if( $type == 'mp4' )
{
preg_match('#/downloads/(.*?).mp4"[URL="https://www.facebook.com/hashtag/i?source=feed_text&epa=HASHTAG"]#i[/URL]' , $log , $mp4);
if( strstr( $mp4[0] , '.mp4' ) )
{
$destination = str_replace(array('/downloads/','"') , '' , $mp4[0]);
}
}
else
{
preg_match('#/downloads/(.*?).mp3#i' , $log , $mp3);
if( strstr( $mp3[0] , '.mp3' ) )
{
$destination = str_replace('/downloads/' , '' , $mp3[0]);
}
}
if( $destination )
{
$save_log = true;
}
}
if( $destination )
{
if( $save_log )
{
file_put_contents( BASEPATH.'/log/'.$id.'_'.$type.'.txt' , $destination);
file_put_contents( BASEPATH.'/btu_convert.txt' , '['.strtoupper($type).'] DATE:'.date('d.m.Y H:i').', IP:'.get_ip().' ID:'.$id.' URL=[URL="https://l.facebook.com/l.php?u=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D%2527.%2524id%26fbclid%3DIwAR14svMx18PDTiqb2HCdA8UwQvr2_62BhJ3PHQDB0q2V6VQcl6CWN6IhJM0&h=AT2yNfX-KZhpMXSvszqwNpeBkLnhDZTxviJUqqMhRsL9Lbd-CYtQEn06Vm6t6hpPoQhcqJX1skht0Zrk797CT4pKwIzBuUehow4SCZ_h2L1y0oyk3POcPvmuPWphEjJIXmczDPvGZlGu_2sT45z9myUD8q0g4tsirg"]https://www.youtube.com/watch?v='.$id[/URL] ."n" , FILE_APPEND);
}
session_start();
$_SESSION['safe_download'] = md5( $id . $type . $hash . $destination );
echo '|'.base_url('download.php?type='.$type.'&file='.urlencode($destination).'&hash='.$hash.'&token='.$_SESSION['csrf'].'&ip='.get_ip().'&checksum='.$_SESSION['safe_download']);
session_write_close();
}
else
{
echo '|-3';
}