Welcome to HBH! If you had an account on hellboundhacker.org you will need to reset your password using the Lost Password system before you will be able to login.

Get Proxy4Free.com Proxies via PHP & XML - PHP Code Bank


Get Proxy4Free.com Proxies via PHP & XML
Get Proxy4Free.com Proxies via PHP & XML
                <?php
//sunjester
//5:51 PM 1/4/2010
//fusecurity.com, veryangrytoad.com
//error_reporting(0);<span id="more-248"></span>
 
$site = "http://www.proxy4free.com/list/webproxy1.html";
$file = "proxy4free.xml";
$contents = file_get_contents($site);
 
$list = explode("pthtd",$contents);
$j=1;
$proxies = array();
 
for($i=0;$i<sizeof($list);$i++)
{
	//echo "<h1 style=\"margin:0px;\">$i,$j</h1><textarea cols=60 wrap=off>".$list[$i]."</textarea><br>";
	if($j == 1)
	{
		array_push($proxies,$list[$i]);
	}
 
	$j++;
	if($j >= 11) $j=0;
}
 
$proxy_list = array();
$fh = fopen($file,"w");
fwrite($fh,"<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\r\n\t<proxy_list>");
 
for($i=1;$i<sizeof($proxies);$i++)
{
	$break = explode("&gt;",htmlspecialchars($proxies[$i]));
	$proxy = "\t<proxy>".substr($break[2],0,strlen($break[2])-6)."</proxy>\r\n";
	fwrite($fh,$proxy);
}
fwrite($fh,"</proxy_list>");
fclose($fh);
 
echo "<p style=\"font-family:verdana;font-size:12px;\">Script finished, <a href=\"".$file."\" target=\"_blank\">view the xml file?</a>";
?>
            
Comments
Sorry but there are no comments to display