Mam taką funkcję:
  1. function curl_file_get_contents($URL)
  2. {
  3. $c = curl_init();
  4. curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
  5. curl_setopt($c, CURLOPT_URL, $URL);
  6. $contents = curl_exec($c);
  7. curl_close($c);
  8.  
  9. if($contents)
  10. {
  11. return $contents;
  12. }
  13. else
  14. {
  15. return FALSE;
  16. }
  17. }


Próbuję wykonać:
  1. $down_html = curl_file_get_contents($link);
  2. echo $down_html;


Iniestety pojawia się błąd. Już wiele razy korzystałem z tej funkcji i nie zawiadoła mnie, ale tym razem jest inaczej....

Gdy próbuję użyć funkcji, pojawia mi się:
Cytat
502 Bad Gateway


Co robić?