Indowebster Link Generator – Source Code

Buat yang butuh source code Indowebster link generator :
Kopi paste kode di bawah ke file php. Webserver harus mendukung cURL.

Indowebster Link Generator

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Indowebster Link Generator</title>
</head>
<body>

<span class="desc"><h2>Indowebster Link Generator</h2>
<br/>

</span>
<form action = "<? print ("{$_SERVER["PHP_SELF"]}"); ?>" method = "post">
<textarea cols="75" rows="15" class = "input" name = "idws" id = "idws" value="<?php
$input = $_POST['idws'];  ?>"></textarea>

<br/>
<br/>
<input class = "button" type = "submit" value = "Generate" id = "send"/>
</form>

<?php

$list = explode("\r\n",$input);
$userAgent = 'Googlebot/2.1 (http://www.googlebot.com/bot.html)';
$html = array();

function reqMultiCurls($urls) {
	// for storing cUrl handlers
	$chs = array();

	// for storing the reponses strings
	$contents = array();

	// loop through an array of URLs to initiate
	// one cUrl handler for each URL (request)
	foreach ($urls as $url) {
		$ch = curl_init();
		// tell cUrl option to return the response
		curl_setopt($ch, CURLOPT_RETURNTRANSFER,TRUE);
		curl_setopt($ch, CURLOPT_USERAGENT, $userAgent);
		curl_setopt($ch, CURLOPT_URL,$url);
		curl_setopt($ch, CURLOPT_FAILONERROR, true);
		curl_setopt($ch, CURLOPT_AUTOREFERER, true);
		curl_setopt($ch, CURLOPT_RETURNTRANSFER,true);
		curl_setopt($ch, CURLOPT_TIMEOUT, 60);
		$chs[] = $ch;
	}

	// initiate a multi handler
	$mh = curl_multi_init();
	// add all the single handler to a multi handler

	foreach($chs as $key => $ch){
		curl_multi_add_handle($mh,$ch);
	}

	// execute the multi cUrl handler
	do {
		$mrc = curl_multi_exec($mh, $active);
	} while ($mrc == CURLM_CALL_MULTI_PERFORM  || $active);

	// retrieve the reponse from each single handler
	foreach($chs as $key => $ch){
		if(curl_errno($ch) == CURLE_OK){
			$contents[] = curl_multi_getcontent($ch);
		} else {
			echo "Err>>> ".curl_error($ch)."\n";
		}
	}

	curl_multi_close($mh);

	// start to print generated links;
	echo "Link : </br>";

	// search for the download link
	foreach($contents as $key => $content) {
		// create dom
		$dom = new DOMDocument();
		@$dom->loadHTML($content);

		//evaluate url
		$xpath = new DOMXPath($dom);
		$hrefs = $xpath->evaluate("/html/body//a");

		// get download link
		for ($i = 0; $i < $hrefs->length; $i++) {
			$href = $hrefs->item($i);
			$url = $href->getAttribute('href');
			preg_match_all('/((?:http|https)(?::\\/{2}www+[0-99|0-99]+)(?:[\\/|\\.]?)(?:[^\\s"]*))/is',$url,$link);

			// create link
			foreach ($link[1] as $out){
				$fout = str_replace("indowebster.com/", "indowebster.com/down.php?path=", $out);
				echo "<a href=".$fout.">".$fout."</a>";
				echo "<br/>";
			}

		}
	}
}

if ($input != '') {
	// call function
	$html = reqMultiCurls($list);
}
?>
<br/>
<a href="http://nhoeadjaj.net">nhoeadjaj</a> | <a href="http://belajaria.co.cc">belajaria</a>
</body>
</html>

Credit to murray_here@kaskus.us (bukan alamat email)

Update – 9 Agustus 2009 :
Kode tidak akan pernah diupdate. Ada komplen dari dari IDWS. Trims :D

Share to:
  • del.icio.us
  • Facebook
  • Mixx
  • Twitter
  • Google Bookmarks
  • Digg
  • Live
  • StumbleUpon
  • Technorati
  • Yahoo! Bookmarks
  • Diigo
  • MySpace
  • blogmarks
  • email
  • FriendFeed
  • RSS
  • Tumblr


Related posts:
  1. Indowebster Link Generator
Posted in Perangkat Lunak by fajargumelar at August 2nd, 2009.
Tags: , , ,

4 Responses to “Indowebster Link Generator – Source Code”

  1. murray_here says:

    aha! :p baru mau gue rilis yang baru udah ada yang ngerjain thanks gue copy paste yah :p

    nanti gue tambahin support ke idws nya wokeh

  2. murray_here says:

    ew source nya ada yang aneh :p

  3. fajargumelar says:

    @TrimsInfonyaGan
    sama sama juga :D

    @murray_here
    itu persi idws yang jadul.. yang sekarang.. belum dipublish.. keburu dapet komplen dari yang punya idwsnya. kalo mau info lebih lanjut langsung aja kontak ke imel fjrgmlr@gmail.com ato pm di kaskus, idnya fjrgmlr..

Leave a Reply