Joined November 2013
·
Posted to
How to send files via cURL in PHP
over 1 year
ago
hi, im trying this :
$ch = curlinit();
curlsetopt($ch, CURLOPTRETURNTRANSFER, 1);
$data = array('name' => 'Foo', 'file' => '@my-event-name.ics');
curlsetopt($ch, CURLOPTURL, 'http://icalx.com/public/zeroan/');
curlsetopt($ch, CURLOPTPOST, 1);
curlsetopt($ch,CURLOPTUSERPWD,'zeroan:pass');
curlsetopt($ch, CURLOPTPOSTFIELDS, $data);
$data2=curlexec($ch);
but its not uploading =( can you help me?
Nothing, i guess the website is the problem =(. Thank you