/ Published in: PHP

A handy function to get the contents of a file with curl. Accepts $_path as a parameter.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function file_content($_path) { curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //Set curl to return the data instead of printing it to the browser. return $data; }
Comments
