Advertisement
dwhitzzz

Wrapper file_get_contents

Dec 22nd, 2016
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.27 KB | None | 0 0
  1. function checkErrorForRequest($url)
  2. {
  3.  
  4.     $response = file_get_contents($url);
  5. //    If the file contains "0", then it will trigger a false negative !
  6.     if ($response === false) {
  7.  
  8.         echo"Error with this url --> $url";
  9.         echo"response --> $response";
  10.     }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement