![]() |
![]() ![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 48 Pomógł: 0 Dołączył: 25.12.2009 Ostrzeżenie: (0%) ![]() ![]() |
Kod <?php ob_start(); $login = "xxx"; $haslo = "xx"; $id = "884343604"; $url = 'http://api.filesonic.com/link?method=getDownloadLink&u='.$login.'&p='.$haslo.'&ids='.$id.'&format=json'; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $str = curl_exec($ch); curl_close($ch); echo $url; die; $str = json_decode($str, TRUE); $download = trim($str['FSApi_Link']['getDownloadLink']['response']['links']['0']['url']); $nazwa = trim($str['FSApi_Link']['getDownloadLink']['response']['links']['0']['filename']); header('Content-Disposition: attachment; filename='.$nazwa); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $download); curl_setopt($ch, CURLOPT_BINARYTRANSFER,1); curl_exec($ch); curl_close($ch); ob_end_flush(); ?> Witajcie, co mam zle w tym kodzie ze nie chce mi pliku pobierac ? |
|
|
![]() ![]() |
![]() |
Aktualny czas: 28.09.2025 - 09:20 |