Page 1 of 1

How to make a php robot that can log in?

Posted: Wed Feb 22, 2012 2:24 pm
by QueenZ
Hello,
I need to make a PHP script that logs into my Wordpress blog Admin panel /wp-admin/ (given the username and password) and then goes to .../wp-admin/user-new.php and automatically creates/adds a new user with the given details.

How is this done? Could you give me an example? Thanks!

Re: How to make a php robot that can log in?

Posted: Thu Feb 23, 2012 7:32 pm
by Eric!
You'll have to use cURL and it's a pretty complicated task to do from scratch if you don't know cURL or the guts behind how web forms works. Since Wordpress is everywhere these days you might find a wordpress demo written in cURL out there on the internet to help speed you up. A quick search revealed: http://stackoverflow.com/questions/7282 ... -wordpress

Re: How to make a php robot that can log in?

Posted: Fri Feb 24, 2012 6:11 am
by Celauran
This sounds like an unnecessarily convoluted solution. Any reason you don't want to add the user directly into the database?