dogtag 0 Report post Posted June 8, 2007 Hithis would be very useful for WEB Programmersif you have a cpanel host, you know that you cannot create MySql DBs and you should do it just by CPanel.by this code you can do it in your programs: <?php// cPanel username$cpanel_user = "user";// cPanel password$cpanel_password = "password";// cPanel host$cpanel_host = "host";// cPanel theme/skin, usually "x"$cpanel_skin = "x";// Path to cURL on your server$curl_path = "/usr/bin/curl";///////////////////////////////////////* Code below should not be changed *///////////////////////////////////////if(isset($_GET['db']) && !empty($_GET['db'])) { // escape db name $db_name = escapeshellarg($_GET['db']); // will return empty string on success, error message on error $result = exec("$curl_path 'http://$cpanel_user:$cpanel_password@$cpanel_host:2082/frontend/$cpanel_skin/sql/adddb.html?db=$db_name'"); // output result echo $result;}else { echo "Usage: cpanel_create_db.php?db=databasename";}?> just replace change these values:$cpanel_user$cpanel_password$cpanel_host Share this post Link to post Share on other sites
Saint_Michael 3 Report post Posted June 9, 2007 Interesting script but $5 says that this is a not a secured script and if anyone saw this saw script running on a site they could use it to plant a wonder SQL injection into your site, or use for a location to sql inject another site. Then while they get away scott free the person hosting the site this script is on will get in trouble for it. Share this post Link to post Share on other sites
jlhaslip 4 Report post Posted June 9, 2007 Looks suspiciously similar to this function:http://www.zubrag.com/scripts/cpanel-database-creator.php Share this post Link to post Share on other sites