<? function get_content($url) { $ch = curl_init(); curl_setopt ($ch, CURLOPT_URL, $url); curl_setopt ($ch, CURLOPT_HEADER, 0); curl_exec ($ch); curl_close ($ch); return $string; } $content = get_content ("htt://rapidshare.com/files/37492574/tvc.rar"); $matches = $matches[0]; $curl = curl_init($action); curl_setopt($curl, CURLOPT_FAILONERROR, 1); curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl, CURLOPT_TIMEOUT, 50); curl_setopt($curl, CURLOPT_POST, 1); curl_setopt($curl, CURLOPT_POSTFIELDS, 'dl.start=Free'); $r = curl_exec($curl); curl_close($curl); // i co dalej?? ?>
Pobiera on stronę pliku z rapidshare wybiera pobieranie sposobem darmowym i wyświetla w kodzie strony odliczanie, gdy to odliczanie się skończy (po 50sekundach) na stronie wyświetla się link.
Teraz przy pomocy jakiejś funckcji w php chciałbym ten link skopiować.
Nikt nie wie jak mi pomóc?
A może jest jakiś całkiem inny prostrzy sposób na wyciągnięcie tego linka?