fork download
  1. <?php
  2. // persiapkan curl
  3. $ch = curl_init();
  4.  
  5. // set url
  6. curl_setopt($ch, CURLOPT_URL, "example.com");
  7.  
  8. // return the transfer as a string
  9. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  10.  
  11. // $output contains the output string
  12. $output = curl_exec($ch);
  13.  
  14. // tutup curl
  15. curl_close($ch);
  16.  
  17. // menampilkan hasil curl
  18. echo $output;
  19. ?>
Success #stdin #stdout 0.04s 26280KB
stdin
Standard input is empty
stdout
Standard output is empty