Thanks for the response, but I was logged in. I think the problem is the loggin cookies. I
don't know how to pass it. The parameter I am passing are the following ones :
1. action= query
2. prop = info|revisions
3. intoken = edit
4. titles = Main_Page
Do I must to pass another parameter? Which is it?
Thanks.
Date: Tue, 7 Oct 2008 16:19:14 +0200
From: roan.kattouw(a)home.nl
To: wikitech-l(a)lists.wikimedia.org
Subject: Re: [Wikitech-l] Problem with edittoken
javi bueno schreef:
Hi! I'm trying to get the edittoken using a
POST call through the next code :
$URL="es.wikipedia.org/w/api.php";
$ch = curl_init( );
curl_setopt($ch, CURLOPT_URL,"http://$URL");
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
$poststring["action"] = "query";
$poststring["prop"] = "info|revisions";
$poststring["intoken"] = "edit";
$poststring["titles"] = "Portada";
$data = curl_exec ($ch);
... but I always received the following response :
edittoken="+\"
anybody knows what's happening?
Since you haven't logged in (or, if you
have, aren't passing the login
cookies), you'll be treated as an anonymous users, whose edit token is
always +\ .
Roan Kattouw (Catrope)
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
_________________________________________________________________
Prueba los prototipos de los Ășltimos en MSN Motor