Im pretty new to php, really new i should say.
But I have been learning some and I followed this tutorial here (thanks Smaxor!) and edited around and set it so that you have a form where you can enter the details instead of it being in the actual variable....
So you enter username, password, and email and it will create an Blog for you on wordpress.
here is the script:
Right now it creates one account at a time.
Im going to keep messing with it later so that you can set how many blogs to create, and it automatically adds a number to the end of your username... such as
jimjim1
jimjim2
jimjim3
jimjim4
etc
and same with the email,
jimjim1@mydomain.com
jimjim2@mydomain.com
etc
so, being my first actual form filling script, tell me what you think.
If you need help setting this up tell me.
But I have been learning some and I followed this tutorial here (thanks Smaxor!) and edited around and set it so that you have a form where you can enter the details instead of it being in the actual variable....
So you enter username, password, and email and it will create an Blog for you on wordpress.
here is the script:
Code:
<?
$display = '<center>
<table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td>
<form action="wordpresser.php" method="post">
username: <input type="text" name="username" />
password: <input type="text" name="password" />
email: <input type="text" name="email" />
<input type="submit"/>
</form>
</td>
</tr>
</table>
</center>' ;
$email = $_POST["email"];
$email = str_replace("@", "%40", $email);
$url = "http://wordpress.com/signup/?abcde=1";
$post = "stage=validate-user-signup&u=&user_name=" . $_POST["username"] . "&pass1=" . $_POST["password"] ."&pass2=" . $_POST["password"] ."&user_email=" . $email .
"&tos=1&signup_for=user&Submit=Next+%C2%BB";
if ($_POST["username"]=="")
echo $display;
else {
echo $display;
echo '<br>' ;
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
echo curl_exec($ch);
curl_close($ch);
}
?>
Im going to keep messing with it later so that you can set how many blogs to create, and it automatically adds a number to the end of your username... such as
jimjim1
jimjim2
jimjim3
jimjim4
etc
and same with the email,
jimjim1@mydomain.com
jimjim2@mydomain.com
etc
so, being my first actual form filling script, tell me what you think.
If you need help setting this up tell me.