Php: Why is this code not working? Is it cookies problem?
I wrote some code to manage my wordpress mu website, but it seems to not work... It uses libcurl and is supposed to login and create new blog. After i load this script in my browser it only logs me in but no new blog is created and all urls on wp-admin are wrong (when i click on them, for开发者_高级运维 example 'admin' or 'blogs' or 'users', etc i get 404). When i login manually, without this script, all urls are clickable. I think that this login part might be the problem... could someone help me with this? I'll paste code here, it's longer than what usually people are pasting into questions, but i would be really glad for any help...
Here's the code:
makeblog.php
baseconf.php
scrape-nonce.php
On the second request, you need to supply the cookie as well.
curl_setopt ($ch, COOKIEFILE, $cookie);
精彩评论