Hi,
From a site i can download a file on my pc cos i have a user name and password of this site. now also if use form of this site on my site i can also download file on my pc cos this site saveing username and password in my kookies so call from my computer even form is running anyother site give access to download file.
My problem is i want to download file from scripting and then save it on my web server. one way i know is that...
<?
$user=$SESSION["user"];
$pass=$SESSION["pass"];
$ch = curl_init();
//curl_setopt($ch,CURLOPT_URL,"https://mydomain.com");
curl_setopt($ch,CURLOPT_URL,"https://https://mydomain.com?startmon=".$startmon."&startday=".$startday."&startyear=".$styear);
curl_setopt($ch,CURLOPT_USERPWD,"$user:$pass");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
// only use the following line if the server doesn't
// have a valid CA Cert
curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,FALSE);
curl_setopt($ch,CURLOPT_HEADER,0);
$content = curl_exec($ch);
curl_close($ch);
//print_r($content);
//print count($content). "count";
echo "<pre>$content</pre>";
?>
but these value if i send throug form it work nice but here is not working. Note form use Post method.
I think thier must be any other way that i send these value like post method then it work nice......????