This file contains hidden or 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 | |
// If your web server is accepting HTTPS connections directly, then the | |
// request will be directly on port 443. If we aren't on port 443, then | |
// it's possible we're using a proxy such as Varnish, in which case, most | |
// modern proxy servers send the HTTP_X_SSL_CIPHER header through with the | |
// request. You could also test for a custom header from your proxy too. | |
if (($_SERVER["SERVER_PORT"] != 443) && | |
(empty($_SERVER["HTTP_X_SSL_CIPHER"]))) | |
{ | |
Header("Location: https://".$_SERVER["SERVER_NAME"]. |
This file contains hidden or 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
RewriteEngine On | |
RewriteCond %{HTTPS} !=on | |
RewriteRule ^(.*)$ https://%{SERVER_NAME}/$1 [R,L] |
This file contains hidden or 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 | |
/** | |
* WordPress Query Comprehensive Reference | |
* Compiled by luetkemj - luetkemj.com | |
* | |
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query | |
* Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php | |
*/ | |
$args = array( |
This file contains hidden or 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
[{ | |
"status":200, | |
"generated":"Thu, 29 Dec 2011 22:32:06 +0000", | |
"name":"Charlotte Place", | |
"image":"\/C07318.jpg", | |
"updated":"1325197800", | |
"age":126, | |
"state":"spaces", | |
"capacity":"144", | |
"used":"122", |
This file contains hidden or 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
{ | |
"generated":"Thu, 29 Dec 2011 22:26:05 +0000", | |
"server":"dor.ky", | |
"woeid":"24875484", | |
"locations": [ | |
{ | |
"id":"C07323", | |
"name":"Bargate Centre", | |
"image":"\/C07323.jpg" | |
}, |
This file contains hidden or 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
The page you requested does not exist. | |
The server could not complete your request. |
This file contains hidden or 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 | |
// OAuth Examples: Twitter | |
// by Scott Wilcox <[email protected]> http://dor.ky @dordotky | |
// https://dor.ky/oauth-examples/twitter | |
// | |
// This script verifies that the credentials you have are actually valid. | |
// | |
// First, require the OAuth library that we're going to use to handle all of the | |
// OAuth dirty work. | |
require "../library/EpiCurl.php"; |
This file contains hidden or 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
<? | |
$m = new Mongo(); | |
$h = $m->user->users; | |
$artist = "Linkin Park"; | |
// lastfm_band_0, lastfm_band_1 or lastfm_band_2 may contain $artist | |
// I need to get the number of documents where this is the case | |
$x = $h->find(array("lastfm_band_0" => $artist, | |
'$or' => array( |
This file contains hidden or 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 | |
// Firstly we need to load our XML file (test.gpx) into | |
// a resource that we can use | |
$xml = simplexml_load_file("test.gpx"); | |
// Put our cache data into a easy to use variable | |
$data = $xml->wpt->children("http://www.groundspeak.com/cache/1/0"); | |
// You can now do anything you wish with the data, | |
// like printing out the cache title and size/container |
This file contains hidden or 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
<?xml version="1.0" encoding="utf-8"?> | |
<gpx xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" version="1.0" creator="Groundspeak, Inc. All Rights Reserved. http://www.groundspeak.com" xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd http://www.groundspeak.com/cache/1/0 http://www.groundspeak.com/cache/1/0/cache.xsd" xmlns="http://www.topografix.com/GPX/1/0"> | |
<name>Cache Listing Generated from Geocaching.com</name> | |
<desc>This is an individual cache generated from Geocaching.com</desc> | |
<author>Account "Gb UK" From Geocaching.com</author> | |
<email>[email protected]</email> | |
<url>http://www.geocaching.com</url> | |
<urlname>Geocaching - High Tech Treasure Hunting</urlname> | |
<time>2010-10-10T22:54:31.1487819Z</time> | |
<keywords>cache, geocache</keywords> |