cURL: from PHP to BASH
- by flienteen
Hi.. I've never done any curl before so am in need of some help.
php:
<?php
$ch = curl_init();
$data = array(
'uptype'=>'file',
'file'=>'@'.$argv[1],
);
curl_setopt($ch, CURLOPT_URL, 'http://my_site_ex/up.php');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_exec($ch);
curl_close($ch);
?>
how to make the same script in BASH?