fork download
  1. <?php
  2. // Generated by curl-to-PHP: http://i...content-available-to-author-only...b.io/curl-to-php/
  3. $ch = curl_init();
  4.  
  5. curl_setopt($ch, CURLOPT_URL, 'ifconfig.me');
  6. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  7.  
  8. $result = curl_exec($ch);
  9. if (curl_errno($ch)) {
  10. echo 'Error:' . curl_error($ch);
  11. }
  12.  
  13. var_dump($result);
Success #stdin #stdout 0.04s 25892KB
stdin
Standard input is empty
stdout
Error:Could not resolve host: ifconfig.mebool(false)