A list of the most common functionalities in Jekyll (Liquid). You can use Jekyll with GitHub Pages, just make sure you are using the proper version.
Running a local server for testing purposes:
A list of the most common functionalities in Jekyll (Liquid). You can use Jekyll with GitHub Pages, just make sure you are using the proper version.
Running a local server for testing purposes:
public function xml() | |
{ | |
$url = ''; | |
$this->load->helper('curl'); | |
$response = curl::get("{$url}:8080/services/user/devices.xml"); | |
$devices = new SimpleXMLElement($response); | |
util::printr( $devices ); | |
foreach ($devices->id as $device) | |
{ |
<?php | |
/** | |
* This class contains a collection of useful functions used all over the place | |
* */ | |
class Util | |
{ | |
/** | |
* Generate a random string | |
* @param integer $xters string length |
<?php | |
class Curl | |
{ | |
var $headers; | |
var $user_agent; | |
var $compression; | |
var $cookie_file; | |
var $proxy; | |
<?php | |
preg_match_all("/\/([^\/]+)\//i", $_SERVER['REQUEST_URI'], $match); | |
define('REQUEST_URI', $_SERVER['REQUEST_URI']); | |
define('BASE_DIR', $match[1][0] . '/'); | |
define ('FS_PATH', str_replace('//', '/', $_SERVER['DOCUMENT_ROOT'] . '/' . BASE_DIR)); | |
define ('BASE_URL', 'http://' . str_replace('//', '/', $_SERVER['SERVER_NAME'] . '/' . BASE_DIR)); |
<?php | |
require("../config.php"); | |
require("../util.php"); | |
if( ! isset( $_SERVER['PHP_AUTH_DIGEST'] ) || empty($_SERVER['PHP_AUTH_DIGEST']) ) | |
{ | |
http_response_code(401); | |
header("HTTP/1.1 401 Unauthorized"); | |
header('WWW-Authenticate: Digest realm="'. $realm .'",qop="auth",nonce="'.uniqid().'",opaque="'. md5($realm) .'"'); |
<?php | |
class Util | |
{ | |
public static $realm = 'PHP ODK Aggregate'; | |
public static $users = [ | |
'admin' => 'mypass', | |
'guest' => 'guest' | |
]; | |
// function to parse the http auth header |
<?php | |
require("../config.php"); | |
require("../util.php"); | |
if ( ! empty($_FILES) ) | |
{ | |
header('Server: Apache-Coyote/1.1'); | |
header('Content-Type: application/xml;charset=UTF-8'); | |
header( "Date: ".date('r')); | |
header('Content-Length: 1000000'); |
This document has now been incorporated into the uWSGI documentation:
#http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html
http://uwsgi-docs.readthedocs.io/en/latest/tutorials/Django_and_nginx.html