|
| Makaleler |
| Toplam Makale |
3330 |
| Yayında |
3150 |
| Bekleyenler |
180 |
| Görüntüleme |
13323098 |
|
|
|
Curl file Downloader
PHP'de curl kütüphanesiyle sunucunuza 200kb hizla dosya çekebilirsiniz.
<? /* * CURL Downloader * Version 1.0 * By Hackerdragons * Hackerpowers.com a.k.a Turkgate.com */ error_reporting(0); function utime (){ $time = explode( " ", microtime()); $usec = (double)$time[0]; $sec = (double)$time[1]; return $sec + $usec; } if(!function_exists('curl_init')){ die("cURL Extension, PHP'de Yüklü Degildir. Lütfen Yükleyin."); } $downloaddir = "./downloaded"; if(!is_dir($downloaddir)){ if(!mkdir( $downloaddir )){ die("Download Dizini Yok ve Olusturulamiyor. Lütfen Manuel Olarak Olusturun, ve CHMOD 777 Atin."); } else { chmod($downloaddir, "0777") or die("CHMOD 777 Yapilamadi. Manuel Olarak Yapiniz!"); } } if(isset($_GET['submit'])){ echo"<h3>Turkgate a.k.a HP cURL Dosya Indirici</h3><hr>"; $file = $_POST['file']; if($file[4] != ":" || $file[5] != "/" || $file[6] != "/" ) { $file = "http://".$file; } if($file[0].$file[1].$file[2].$file[3] == "file"){ die("Bu Script, Local URL'ler Ile Çalismak Üzere Ayarlanmamistir."); } $do = parse_url($file); $xx = $do['path']; $xy = pathinfo($xx); $locfn = $xy['basename']; $locpth = $downloaddir."/".$locfn; if(file_exists($locpth)){ unlink($locpth) or die($locpath." Mevcut ve Dosya Overwrite Edilemiyor, Dosya Adini Degistirin yada Silin."); echo $locpth."Dosyasi Mevcut. Overwrite Ediliyor.<br>"; } flush(); $start = utime(); $curl = curl_init($file); ob_start(); curl_exec($curl); $contents = ob_get_contents(); ob_end_clean(); $handle = fopen($locpth, "a+"); fwrite($handle, $contents); fclose($handle); $end = utime(); $run = $end - $start; echo"Dosyaniz, Download Basarili Oldu Ise, ".$locpth." Dosyasina Kayit Edildi.<br>"; echo round(filesize($locpth), 0)."byte Dosya, " . round($run, 0) . " Saniyede Indirildi(".round(filesize($locpth)/round($run, 0), 0)."bps).<br>"; echo"<hr>By Hackerdragons.[2004]<br>©2004 Coderturk.com.<br>Released Under GNU/GPL."; } else { ?> <h3>Turkgate a.k.a. HP cURL Dosya Indirici</h3><hr> <form action='<? echo $_SERVER['PHP_SELF']; ?>?submit=1' method='post'> Dosya URL'si Giriniz: <input type='text' name='file'><input type='submit' name='submit' value='Download'><input type='reset' value='Sifirla'> </form> <? echo"<hr>By Hackerdragons.[2004]<br>©2005 Turkgate.com a.k.a Hackerpowers.com & Coderturk.com.<br>Released Under GNU/GPL."; } ?>
Bu makale hakkında ek bilgi eklemek için buraya tıklayınız
Bu makalenin yazar yada kaynağını bildirmek için tıklayınız.
Eklenme tarihi: 12-8-2006 Okunma: 2058
|
| Bu Makaleye Verilen Puan: |
Bu makaleye puan verilmemiş.
|
Kullanıcı Yorumları
Bu makaleye yorum gönderilmemiş, ilk yorumu sen gönder !
İlgili Dökümanlar
|
|
|