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 | |
/* | |
Plugin Name: Orchestra.io Upload to Temp | |
Plugin URI: | |
Description: Sets the upload path to sys_get_temp_dir(), allowing uploads to be stored temporarily, presumably before being moved elsewhere (like Amazon S3 via the tantan-s3 plugin). | |
Version: 0.1 | |
Author: Dylan Kuhn | |
Author URI: http://www.cyberhobo.net/ | |
Minimum WordPress Version Required: 3.0 | |
License: GPL2+ |
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 | |
echo $_SERVER['HTTP_HOST']; | |
echo PHP_EOL; | |
echo $_SERVER['REQUEST_URI']; | |
print_r($_SERVER); | |
?> |
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 | |
ini_set('user_ignore_abort', true); | |
?> |
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 | |
$host = ""; | |
$port = 3909; | |
$db = ""; | |
$user = ""; | |
$pass = ""; | |
echo "<pre>"; |
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 | |
$uploaddir = sys_get_temp_dir()."/"; | |
$uploadfile = $uploaddir . basename($_FILES['userfile']['name']); | |
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) { | |
// Connect to Mongo and set DB and Collection | |
$mongo = new Mongo("mongodb://user:pass@host:port/db"); | |
$db = $mongo->selectDB('db'); |
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
SELECT MONTHNAME(Application.created_at) as "Month", YEAR(Application.created_at) as "Year", COUNT(*) as "NUmber of Apps" | |
FROM Application | |
JOIN UserApplication ON Application.id = UserApplication.Application_id | |
JOIN User ON UserApplication.User_id = User.id | |
AND User.email NOT LIKE '%@engineyard.com' | |
GROUP BY MONTH(Application.created_at), YEAR(Application.created_at) | |
ORDER BY YEAR(Application.created_at) DESC, MONTH(Application.created_at) DESC |
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 | |
$email = $_POST['email']; | |
$message = $_POST['message']; | |
mail("kholler@engineyard.com", "Email Subject", $message, "From: $email"); | |
?> | |
<form method="post" action="index.php"> | |
Email: <input name="email" type="text" /> |
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 | |
$structure = sys_get_temp_dir().'/bla'; | |
if (!mkdir($structure, 0, true)) { | |
die('Failed'); | |
} | |
?> |
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 phpinfo(); ?> |
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
### Symphony 2.3.x ### | |
Options +FollowSymlinks -Indexes | |
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
RewriteBase /<!-- REWRITE_BASE --> | |
### SECURITY - Protect crucial files | |
RewriteRule ^manifest/(.*)$ - [F] |
OlderNewer