Guest User

Untitled

a guest
Apr 1st, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. <?php
  2.  
  3. $url = 'http://server.ext:port/page.php?username=test&password=pass';
  4. $targetFile = fopen('download.m3u', 'w+');
  5.  
  6. $curl = curl_init($url);
  7. curl_setopt($curl, CURLOPT_FILE, $targetFile);
  8.  
  9. $result = curl_exec($curl);
  10. curl_close($curl);
  11.  
  12. echo $result ? 'Download successful!' : 'Download failed.';
Add Comment
Please, Sign In to add comment