Skip to content

Instantly share code, notes, and snippets.

View otjutt's full-sized avatar

Omar Tariq otjutt

View GitHub Profile
// cURL replacement for file_get_contents()
// Safer alternative to enabling allow_url_fopen in php.ini :)
function file_get_contents_curl($url) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $url);
$data = curl_exec($ch);
curl_close($ch);
@otjutt
otjutt / 0_reuse_code.js
Created October 2, 2013 05:36
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console