This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* | |
* Based on (forked from) the work by https://gist.github.com/Kostanos | |
* | |
* This revision allows the PHP file to be included/required in another PHP file and called as a function, rather than focusing on command line usage. | |
* | |
* Convert JSON file to CSV and output it. | |
* | |
* JSON should be an array of objects, dictionaries with simple data structure |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// set up excel | |
$excel = new COM("excel.application") or die("Unable to instantiate excel"); | |
// run Excel silently, since we don’t want dialog boxes popping up in the background | |
$excel->DisplayAlerts = false; | |
// open up Excel file and select the first sheet, which contains the inputs | |
$excel->Workbooks->Add(); | |
$book = $excel->ActiveWorkbook; | |
$sheets = $book->Sheets; | |
$sheet = $book->Worksheets(1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Description of VideoStream | |
* | |
* @author Rana | |
* @link http://codesamplez.com/programming/php-html5-video-streaming-tutorial | |
*/ | |
class VideoStream | |
{ | |
private $path = ""; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<!-- View this at https://rawgit.com/johnmellor/460bdac0c5b30832df898e67b4b7cedf/raw/ --> | |
<meta name=viewport content="initial-scale=1"> | |
<a href="https://gist.github.com/johnmellor/460bdac0c5b30832df898e67b4b7cedf">View code</a><br> | |
<a href="https://rawgit.com/johnmellor/d792819c4faa24a190bb7ea0138fba3e/raw/">cURL variant</a> | |
<p id="loading">Loading...</p> | |
<div id="loaded" style="display: none"> | |
<p><strong>Endpoint:</strong> <output id="registration-id"></output> | |
<p><button id="send-button">Send push</button><br> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This class works on arrays, not on JSON strings | |
* directly. You have to use json_encode/json_decode | |
* for doing this. | |
* | |
* @author [email protected] | |
* | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This class works on arrays, not on JSON strings | |
* directly. You have to use json_encode/json_decode | |
* for doing this. | |
* | |
* @author [email protected] | |
* | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="es"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Ordena JSON</title> | |
<meta name="description" content="Ordenar un JSON en Javascript"> | |
<meta name="author" content="Fernando Magrosoto V."> | |
<style> | |
body { | |
background-color: white; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$url = "http://{site_url}/service/v4/rest.php"; | |
$username = "admin"; | |
$password = "password"; | |
//function to make cURL request | |
function call($method, $parameters, $url) | |
{ | |
ob_start(); |
NewerOlder