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 | |
ini_set('display_errors', '1'); | |
$memcache = new Memcache; | |
$memcache->connect('orchestra-io.pjekkp.0001.use1.cache.amazonaws.com', 11211); | |
($memcache->add('testkey', 'It worked!')? "Added data." : "There was a problem adding data.") . "<br/>"; | |
($memcache->get('testkey')?: "This should have worked") . "<br/>"; |
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 (!( | |
isset($_SERVER['PHP_AUTH_USER']) | |
&& 'username' == $_SERVER['PHP_AUTH_USER'] | |
&& isset($_SERVER['PHP_AUTH_PW']) | |
&& sha1('password') == sha1($_SERVER['PHP_AUTH_PW']) | |
)) { | |
header('WWW-Authenticate: Basic realm="Orchestra"'); | |
header('HTTP/1.0 401 Unauthorized'); | |
echo "You must authenticate to use this site.\n\n"; |
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 | |
usleep(100000); |
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 | |
header("X-Orchestra-Server: app1-new"); | |
phpinfo(); |
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 | |
var_dump($_SERVER['HTTP_HOST']); |
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
function TestController() { | |
var iansFunction = function() { return true; } | |
iansFunction(); // returns true | |
} | |
iansFunction(); // returns uncallable |
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 | |
$options = array('options'=>array( | |
'min_range' => 1, | |
'max_range' => 5, | |
'default' => 3 | |
)); | |
$_GET['grievous'] = filter_var($_GET['grievous'], FILTER_VALIDATE_INT, $options); |
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 | |
var_dump(! empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off'); |
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 | |
echo "Some test stuff"; | |
trigger_error("This is a test - trigger_error()", E_USER_ERROR); | |
syslog(LOG_ERR, "This is a test - syslog()"); |
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 | |
echo "Domain 2"; |