cURL: from PHP to BASH
Posted
by flienteen
on Stack Overflow
See other posts from Stack Overflow
or by flienteen
Published on 2010-05-30T14:35:41Z
Indexed on
2010/05/30
14:42 UTC
Read the original article
Hit count: 301
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?
© Stack Overflow or respective owner