Created
October 4, 2011 14:16
-
-
Save anveo/1261745 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env php | |
<?php | |
//setup global $_SERVER variables to keep WP from trying to redirect | |
$_SERVER = array( | |
"HTTP_HOST" => "http://mysite.com", | |
"SERVER_NAME" => "http://mysite.com", | |
"REQUEST_URI" => "/", | |
"REQUEST_METHOD" => "GET" | |
); | |
//require the WP bootstrap | |
require_once(dirname(__FILE__).'/wp-load.php'); | |
//add your own code here |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment