<?php $proxy=""; //////////////////////////////////////////////////////////////// if(@$_POST['enter']){ if($_POST['cod']!=''){$postdata="img_code=".$_POST['cod']."&file_password=&gateway_result=1&icid=".$_POST['cid']."&go=1"; $cookies="uprand=".$_POST['cokie']."; path=/; domain=.depositfiles.com"; } else {$postdata="gateway_result=1";} echo $postdata; $ch2 = curl_init(); curl_setopt($ch2, CURLOPT_URL,'http://depositfiles.com/ru/files/'.$_POST['number'].''); // set url to post to curl_setopt($ch2, CURLOPT_PROXY, $proxy); curl_setopt($ch2, CURLOPT_HEADER, 1); curl_setopt($ch2, CURLOPT_FOLLOWLOCATION, 1);// allow redirects curl_setopt($ch2, CURLOPT_USERAGENT, 'Opera/9.24 (Windows NT 5.1; U; ru)'); curl_setopt($ch2, CURLOPT_RETURNTRANSFER,1); // return into a variable curl_setopt($ch2, CURLOPT_COOKIE, $cookies); curl_setopt($ch2, CURLOPT_POST, 1); // set POST method curl_setopt($ch2, CURLOPT_POSTFIELDS, $postdata); // add POST fields curl_setopt($ch2, CURLOPT_TIMEOUT, 8); $result2 = curl_exec($ch2); // run the whole process curl_close($ch2); echo $result2; preg_match("|Set-Cookie: uprand=([\d\w]+);|i",$result2,$cookie); //echo $cookie[1]; preg_match_all("/<input type=\"hidden\" name=\"icid\" value=\"(.*?)\">/i",$result2,$ersend); //http://depositfiles.com/get_download_img_code.php?icid=d5vbgOGfs6DPvTx4suUgyA__ //echo $ersend[1][0]."<br>"; echo "<img src=\"http://depositfiles.com/get_download_img_code.php?icid={$ersend[1][0]}\">"; } ?> <form action="" method="POST"> <input type="hidden" name="cid" value="<?=$ersend[1][0];?>" /> <input type="hidden" name="cokie" value="<?=$cookie[1];?>" /> Nomer Faila:<input type="text" name="number" value="<?=$_POST['number'];?>" /> Captcha: <input type="text" name="cod" size="10"/> <input type="submit" name="enter" value="Ok »" /> </form>