Thanx Bryan and Platonides for the reply

I am still couldnt manage to upload the image

Could you please elaborate more what should be done

I tried to access the page

it displays

From Wikipedia, the free encyclopedia

Jump to: navigation, search

The action you have requested is limited to Autoconfirmed users, Administrators, Confirmed users.

Return to Main Page.

On Thu, Feb 11, 2010 at 7:45 PM, Bryan Tong Minh <> wrote:

Except from the issue that Platonides mentioned, there is something
else wrong with your postdata

On Thu, Feb 11, 2010 at 2:10 PM, Herulee <> wrote:
>        $file = "c:\\images\\D4215_0_0.jpg";
>        $data = "action=upload&filename=$file&token=%2B%5C";
This is urlencoded data.

>                fputs($fp, "Content-type: multipart/form-data \r\n");
You specify multipart/form-data. When you specify that you send
multipart/form-data, it's not going to work if you send urlencoded
data. You need to send the data in the encoding that you specify; you
can't expect it to work otherwise.


Mediawiki-api mailing list