This has been shut down by the hosting provider.
Last edited by GeonoTRON2000 (2012-05-07 10:20:59)
Offline
Pretty Cool!
Can I see the creation script, I am interested to see how it works.
Offline
logiblocs wrote:
Pretty Cool!
Can I see the creation script, I am interested to see how it works.
Sure!
File: create.php
<?php
mysql_connect("blah", "blah", "blah");
mysql_select_db("blah");
function copy_directory( $source, $destination ) {
if ( is_dir( $source ) ) {
@mkdir( $destination );
$directory = dir( $source );
while ( FALSE !== ( $readdirectory = $directory->read() ) ) {
if ( $readdirectory == '.' || $readdirectory == '..' ) {
continue;
}
$PathDir = $source . '/' . $readdirectory;
if ( is_dir( $PathDir ) ) {
copy_directory( $PathDir, $destination . '/' . $readdirectory );
continue;
}
copy( $PathDir, $destination . '/' . $readdirectory );
}
$directory->close();
}else {
copy( $source, $destination );
}
}
$dir = stripslashes($_POST["dirname"]);
$dir = trim($dir, " /;?&+=");
$config = <<<HERE
<?php
// phpBB 3.0.x auto-generated configuration file
// Do not change anything in this file!
\$dbms = 'mysql';
\$dbhost = 'blah';
\$dbport = '';
\$dbname = 'blah';
\$dbuser = 'blah';
\$dbpasswd = 'blah';
\$table_prefix = '{$dir}_';
\$acm_type = 'file';
\$load_extensions = '';
@define('PHPBB_INSTALLED', true);
// @define('DEBUG', true);
// @define('DEBUG_EXTRA', true);
?>
HERE;
if (!file_exists($dir)) {
mysql_query("SET SQL_MODE=\"NO_AUTO_VALUE_ON_ZERO\"");
copy_directory("template", $dir);
$handle = fopen($dir."/config.php", "w");
fwrite($handle, $config) or die("Could not modify configuration file.");
ob_clean();
ob_start();
readfile("template.sql");
$data = ob_get_clean();
$data = strtr($data, array("template" => $dir));
$d2 = strtr($data, array("temp" => "template"));
$data = strtr($d2, array("teehee" => "temp"));
$ds = explode(";\n", $data);
foreach($ds as $d) {
mysql_query($d) or die(mysql_error());
}
$good = <<<HERE
<html>
<head>
<title>Forum created.</title>
</head>
<body>
<h1>Forum created!</h1>
<p>Login <a href="$dir">here</a>.</p>
<p>Login as ADMINUSER with password ADMINPASS.</p>
<p>You can change your username from the admin control panel, and your e-mail/password from the user control panel.</p>
</body>
</html>
HERE;
die($good);
}
else {
die("Forum already exists.");
}
?>I replaced the sql info with blah.
File: template.sql (this is the glitchy one)
EDIT: code is too long to post. See the file instead.
Offline
Bug: When you try to register phpbbhosting.tk/ (no sub-url), it gives an error message.
(not that it should let you overwrite the root, but it could echo echo "Please choose a URL" instead of producing the error.)
Offline
XenoK wrote:
very cool! Do you mind if I use this in the future, I'll give you credit!
Sure!
Offline
PullJosh wrote:
The good news: It works. The bad news: I don't know how to start doing stuff.
![]()
Login as ADMINUSER with password ADMINPASS. Use the ACP to change features.
Offline
GeonoTRON2000 wrote:
PullJosh wrote:
The good news: It works. The bad news: I don't know how to start doing stuff.
![]()
Login as ADMINUSER with password ADMINPASS. Use the ACP to change features.
Thanks!

Offline
I ripped you off (a bit).
See http://scratch.mit.edu/forums/viewtopic.php?id=96379.
Offline
GeonoTRON2000 wrote:
I have created a site, much like PunBB hosting, for phpBB3.
It is called phpBB Hosting.
It is here: [removed. Please register personal sites here first before posting any links to them on the Scratch Forums]
Please report any bugs with the forums, the creation script is still buggy.
Oh... duh. Sorry. I forgot.
Offline
jvvg wrote:
I ripped you off (a bit).
See http://scratch.mit.edu/forums/viewtopic.php?id=96379.
It's ok. I got the idea from PunBB hosting anyway.
Offline
You can remove test - that was just a test. Maybe add a captcha to stop spammers.
Offline