$url = 'http://svg.sencha.io'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $_POST); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $file = curl_exec($ch); curl_close($ch); var_dump($file);
$_POST contains the parameters type, width, height and svg. They seem to be fine, because I runned cUrl directly from my machine and it worked. So the problem really is with cUrl and php.
string(12) "Bad request."
I would really appreciate some help, I've been stuck in this for awhile now.