Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $url = 'http://server.ext:port/page.php?username=test&password=pass';
- $targetFile = fopen('download.m3u', 'w+');
- $curl = curl_init($url);
- curl_setopt($curl, CURLOPT_FILE, $targetFile);
- $result = curl_exec($curl);
- curl_close($curl);
- echo $result ? 'Download successful!' : 'Download failed.';
Add Comment
Please, Sign In to add comment