I've been on this for 3 days now but I can't seem to resolve it, the user will input the url and the system will upload it on remote server.. this is what I've done so far
$POST_DATA = array(
'file' => '@'. 'http://images.visitcanberra.com.au/images/canberra_hero_image.jpg',
'extension' => 'txt',
'filename' => 'test',
'directory' => 'uploads/'
);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'http://1234.4321.67.11/upload.php');
curl_setopt($curl, CURLOPT_TIMEOUT, 30);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $POST_DATA);
$response = curl_exec($curl);
curl_close ($curl);