Advertisement
Guest User

Untitled

a guest
Aug 19th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. <?php
  2. function curlDownload($Url)
  3. {
  4. if (!function_exists('curl_init'))
  5. {
  6. die('cURL nie jest zainstalowany!');
  7. }
  8.  
  9. $ch = curl_init();
  10.  
  11. curl_setopt($ch, CURLOPT_URL, $Url);
  12. curl_setopt($ch, CURLOPT_REFERER, "https://www.denley.pl/");
  13. curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla");
  14. curl_setopt($ch, CURLOPT_HEADER, 0);
  15. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  16. curl_setopt($ch, CURLOPT_TIMEOUT, 10);
  17.  
  18. $output = curl_exec($ch);
  19.  
  20. curl_close($ch);
  21.  
  22. return $output;
  23. }
  24.  
  25. echo curlDownload('https://www.denley.pl/');
  26.  
  27. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement