Skip to content

Instantly share code, notes, and snippets.

View djmeph's full-sized avatar

DJ Meph djmeph

View GitHub Profile
function post($url,$data, $username, $password) {
$file = file_get_contents($data, true);
$process = curl_init();
curl_setopt($process, CURLOPT_URL, $url);
curl_setopt($process, CURLOPT_USERPWD, "$username:$password");
curl_setopt($process, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($process, CURLOPT_HTTPHEADER, $this->headers);
curl_setopt($process, CURLOPT_HEADER, 1);
curl_setopt($process, CURLOPT_VERBOSE, false);
@djmeph
djmeph / json2xml.js
Created October 9, 2014 19:43
json2xml
/* This work is licensed under Creative Commons GNU LGPL License.
License: http://creativecommons.org/licenses/LGPL/2.1/
Version: 0.1
Author: Norman Witte III/2014
Web: http://djmeph.net/
Adapted from https://gist.github.com/c4milo/3738875
*/
window.json2xml = function (o) {
//Apigee Reg
var apigee = {
orgName: "ORG_NAME",
appName: "APP_NAME",
notifier: "NOTIFIER",
senderID: "SENDER_ID",
init: function () {
document.addEventListener("deviceReady", this.deviceReady, false);
},
deviceReady: function () {