/ Published in: PHP
This script downloads the latest version of WordPress to your site rather than having to use FTP.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<pre><?php // Download utility function shailan_get_file( $url, $target ){ echo "<h3>Downloading file..</h3><br />"; } } function shailan_dir_URL() { $dirURL .= ( ($_SERVER["SERVER_PORT"] == "80") ? $_SERVER["SERVER_NAME"] : $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"] ); return $dirURL; } $current_url = shailan_dir_URL(); echo "It appears that Wordpress has already been already uploaded and/or installed.<br />\n"; echo "This utility is designed for clean installs only.<br />"; } echo "It does not appear that the current directory is writable.<br />\n"; echo "Please correct and re-run this script.<br />\n"; } $availfiles[] = $file; } } } } echo "Multiple verions of Wordpress archives detected.<br />\n"; echo "Please delete all but the one you wish to install, or delete all of them and allow this script to<br />\n"; echo "download the latest version available from Wordpress.org.<br />\n"; } echo "<br /><h3>Extracting..</h3><br />"; echo "<br /><h3>Moving..</h3><br />"; echo "<br /><h3>Removing unnecessary files..</h3><br />"; echo "<br /><h3>Done.</h3><br />"; echo "<br /><h3 style='position:absolute;background:magenta;padding:10px;top:0;width:200px;margin:10px;'>Install WP : <a href=\"" . $current_url ."wp-admin/install.php\">Proceed..</a></h3><br />";