Skip to content

Instantly share code, notes, and snippets.

@cthos
cthos / gist_test.php
Created April 2, 2012 19:42
Get Raw Gist from Curl
<?php
$test_url = 'https://gist.github.com/2286656';
$bits = explode('/', $test_url);
$id = array_pop($bits);
$raw_url = 'https://raw.github.com/gist/' . $id;
$ch = curl_init($raw_url);