Малко помощ с preg_replace

webdeveloper

Registered
Здравейте някой може ли да ми направи един preg_replace

http://static.4shared.com/flash/player.swf?file=http://dc256.4shared.com/img/452974008/42e07cec/dlink__2Fdownload_2FKg16wYoF_3Ftsid_3D20101228-112250-a54da9b3/preview.mp3&logo=http://dc256.4shared.com/images/logo.png&image=http://dc256.4shared.com/images/icons/misc/mp3_200x180.jpg&plugins=revolt-1,sharing,ltas&ltas.cc=rvlfdyginfjkpdu&sharing.link=http://www.4shared.com/audio/Kg16wYoF/Alisiq_-_Vajno_li_ti_e.html&sharing.code=%3Cembed%20src%3D%22http://www.4shared.com/embed/452974008/42e07cec%22%20width%3D%22420%22%20height%3D%22250%22%20allowfullscreen%3D%22true%22%20allowscriptaccess%3D%22always%22%20%2F%3E


Искам с него да вземе съдържанието след file= до &
 
Нямаш нужда от преg_replace в случая..
Код:
<?php
$str="http://static.4shared.com/flash/player.swf?file=http://dc256.4shared.com/img/452974008/42e07cec/dlink__2Fdownload_2FKg16wYoF_3Ftsid_3D20101228-112250-a54da9b3/preview.mp3&logo=http://dc256.4shared.com/images/logo.png&image=http://dc256.4shared.com/images/icons/misc/mp3_200x180.jpg&plugins=revolt-1,sharing,ltas&ltas.cc=rvlfdyginfjkpdu&sharing.link=http://www.4shared.com/audio/Kg16wYoF/Alisiq_-_Vajno_li_ti_e.html&sharing.code=%3Cembed%20src%3D%22http://www.4shared.com/embed/452974008/42e07cec%22%20width%3D%22420%22%20height%3D%22250%22%20allowfullscreen%3D%22true%22%20allowscriptaccess%3D%22always%22%20%2F%3E";
$ex=explode("?file=", $str);
$ex2=explode("&", $ex[1]);

$new_str=$ex2[0];

echo $new_str;
?>
 

Back
Горе