php, curl , php curl , multipart/form-data , upload picture redirect

Posted by Michael on Stack Overflow See other posts from Stack Overflow or by Michael
Published on 2010-06-10T17:16:50Z Indexed on 2010/06/10 18:02 UTC
Read the original article Hit count: 792

Filed under:
|
|

I'm trying to upload some pictures using php cURL on a classified ad website .I think that I set all the parameters properly but I see that there is a kind of redirect after I post the picture . The issue is that the url where I'm getting redirected gives 404 error instead to return the html that it does when I make the post with a normal browser .

here is the php code that I have so far "

$URL = "http://api.classistatic.com/api/image/upload";
$s = "PAD001";
$v = "2";
$n = "k";
$a = "1:a126581b8150ddc1337cabce28f2feb53849fd143bd6e42649f90175c0e023e3";
$u = "@/var/www/html/artwork/tmp/!BszBLV!EGk~$(KGrHqEOKicEvMi8HVg(BL5ZbWvs0g~~_1.JPG";

$htmlContent = $baseClass->processPicturerequest($URL, $s, $v, $b, $n, $a, $u);

The log from server is as following : http://pastebin.com/gZqPgsFX

© Stack Overflow or respective owner

Related posts about php

Related posts about post