Skip to content

Instantly share code, notes, and snippets.

View sluther's full-sized avatar

Scott Luther sluther

View GitHub Profile
@sluther
sluther / whatiswrongwiththis.php
Created November 10, 2012 04:42
I DONT GET IT
function send_json_to_node($args) {
$data_string=json_encode($args['postdata']);
$ch = curl_init($args['url']);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST,"POST");
curl_setopt($ch,CURLOPT_POSTFIELDS,$data_string);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch,CURLOPT_HTTPHEADER,array(
'Content-Type:application/json','Content-Length:'strlen($data_string)));
$result = curl_exec($ch);
}
<?php
require COREPATH.'classes'.DIRECTORY_SEPARATOR.'autoloader.php';
class_alias('Fuel\\Core\\Autoloader', 'Autoloader');
// Bootstrap the framework DO NOT edit this
require_once COREPATH.'bootstrap.php';
Autoloader::add_classes(array(