| Server IP : 103.82.32.14 / Your IP : 216.73.217.140 Web Server : Apache/2.2.32 (Unix) mod_ssl/2.2.32 OpenSSL/1.0.1e-fips mod_fcgid/2.3.9 System : Linux cloud.lonmanhoabinh.com 2.6.32-754.35.1.el6.x86_64 #1 SMP Sat Nov 7 12:42:14 UTC 2020 x86_64 User : lonmakmf ( 524) PHP Version : 5.6.30 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /home/quanlerc/public_html/application/controllers/ |
Upload File : |
<?php
class Proxy extends CI_Controller
{
public function __construct(){
parent::__construct();
$this->load->model('bot/Bot_model');
}
public function index($language = 'vi'){
//$proxy = $this->xroxy_dot_com("http://www.xroxy.com/proxy-country-US.htm");
//$proxy .= "\r\n".$this->xroxy_dot_com("http://www.xroxy.com/proxylist.php?port=&type=&ssl=&country=US&latency=&reliability=&sort=reliability&desc=true&pnum=1#table");
$proxy = $this->proxynova_dot_com();
$proxy .= "<->".$this->gatherproxy_dot_com();
$proxy .= "<->".$this->proxygaz_dot_com();
//echo '<textarea>';
echo $proxy;
//echo '</textarea>';
// echo file_get_contents("http://www.proxylisty.com/country/Vietnam-ip-list");
// echo file_get_contents("http://free-proxy.cz/en/proxylist/country/VN/all/ping/all");
// echo file_get_contents("http://www.ipspider.com/proxy-and-socks-list/p/VN/");
// echo file_get_contents("http://spys.ru/free-proxy-list/VN/");
}
public function proxygaz_dot_com(){
$text = file_get_contents("http://proxygaz.com/country/united-states-of-america-proxy/");
$text = $this->Bot_model->find_fix($text, 'div.class.plbc_bloc_proxy');
$text = str_replace(array("\r\n","\r","\n","\t"),"", $text);
// echo '<textarea>1. '.$text.'</textarea>';
preg_match_all('/document\.write\(Base64\.decode\(\"(.+?)\"\)\)/', $text, $ip);
preg_match_all('/\<td class\=\"plbc\_bloc\_proxy\_td\_port\"\>(.+?)\<\/td\>/', $text, $port);
$proxy = '';
foreach($ip[1] as $key => $item)
{
$item = base64_decode($item);
$p = htmlspecialchars_decode($port[1][$key]);
if($p == null) continue;
$port_p = trim(preg_replace("/\<(.+?)\>/","",$p)," ");
if($key == 0)
{
$proxy .= $item . ':' . $port_p;
continue;
}
$proxy .= "<->".$item . ':' . $port_p;
}
return $proxy;
}
private function enc_port_gatherproxy_dot_com($enc){
switch($enc){
case '50':
return '80';
case '1F90':
return '8080';
case 'C38':
return '3128';
case '1BB':
return '443';
default:
return null;
}
}
public function gatherproxy_dot_com(){
$text = file_get_contents("http://www.gatherproxy.com/proxylist/country/?c=United%20States");
$text = $this->Bot_model->find_fix($text, 'div.id.body+class.wrapper');
$text = str_replace(array("\r\n","\r","\n","\t"),"", $text);
preg_match_all('/PROXY\_IP\"\:\"(.+?)\"/', $text, $ip);
preg_match_all('/PROXY\_PORT\"\:\"(.+?)\"/', $text, $port);
$proxy = '';
foreach($ip[1] as $key => $item)
{
$p = $this->enc_port_gatherproxy_dot_com($port[1][$key]);
if($p == null) continue;
$port_p = trim(preg_replace("/\<(.+?)\>/","",$p)," ");
if($key == 0)
{
$proxy .= $item . ':' . $port_p;
continue;
}
$proxy .= "<->".$item . ':' . $port_p;
}
return $proxy;
}
public function proxynova_dot_com(){
$text = file_get_contents("http://www.proxynova.com/proxy-server-list/country-us/");
$text = $this->Bot_model->find_fix($text, 'div.id.main_container','NONEREPLACE');
$text = str_replace(array("\r\n","\r","\n","\t", " "),"", $text);
//echo '<textarea>1. '.$text.'</textarea>';
preg_match_all('/row_proxy_ip\"\>(.+?)\</', $text, $ip);
preg_match_all('/row_proxy_ip\"\>(.+?)\<\/span\>\<\/td\> \<td align\=\"left\"\>(.+?)<\/td\>/', $text, $port);
$proxy = '';
foreach($ip[1] as $key => $item)
{
$p = $port[2][$key];
$port_p = trim(preg_replace("/\<(.+?)\>/","",$p)," ");
if($key == 0)
{
$proxy .= $item . ':' . $port_p;
continue;
}
$proxy .= "<->".$item . ':' . $port_p;
}
return $proxy;
}
public function xroxy_dot_com($url){
$text = file_get_contents($url);
$text = $this->Bot_model->find_fix($text, 'div.id.content');
$text = str_replace(array("\r\n","\r","\n","\t"),"", $text);
preg_match_all('/title\=\'View this Proxy details\'\>(.+?)\<\!/', $text, $ip);
preg_match_all('/Select proxies with port number (.+?)\'/', $text, $port);
$proxy = '';
foreach($ip[1] as $key => $item)
{
if($key == 0)
{
$proxy .= $item . ':' . $port[1][$key];
continue;
}
$proxy .= "<->".$item . ':' . $port[1][$key];
}
return $proxy;
}
}
?>