39.gif

Search (advanced search)
Use this Search form before posting, asking or make a new thread.
Tips: Use Quotation mark to search words (eg. "How To Make Money Online")

10-31-2014, 04:14 PM
Post: #1
[GET] Hidemyass Proxy Scraper [Source]
proxy.class.php

PHP Code:
<?php
require_once('curl.class.php');
require_once(
'dom.class.php');

class 
proxy
{

    private 
$url 'http://proxylist.hidemyass.com/';
    private 
$file 'proxy.txt';
    
    function 
parse($data
    {
    
        
$data preg_replace('/\.(.*?)\{display\:inline\}/'''$data);
        
$data preg_replace('/(\<div|\<span) style\=\"display\:none\"\>(.*?)(\<\/div\>|\<\/span\>)/'''$data);
        
        
preg_match_all('/\.(.*?)\{display\:none\}/'$data$page);
            
        foreach (
$page[1] as and$pages) {
            
            
$data preg_replace('/class\=\"' $pages '\"/''style="display:none"'$data);
                
        }
            
        
$data preg_replace('/\<span style\=\"display:none\"\>(.*?)\<\/span\>/'''$data);
        
        return 
$data;
    
    }
    
    function 
grab_proxylist()
    {
        for (
$i 0$i <= 4$i++) {
    
            
$data curl::visible($this->url.$i);

            
$data $this->parse($data);
            
            
$html file_get_content($data);
            
            foreach (
$html->find('.altshade') as $element) {
                
                
$ip preg_replace('/\s/'''$element->children(1)->plaintext);
                
$port preg_replace('/\s/'''$element->children(2)->plaintext);
                
                
$proxylist[] = $ip ':' $port;

            }
        
        }
        
        return 
$proxylist;
    
    }
    
    function 
grab_proxy()
    {
        for (
$i 0$i <= 4$i++) {
    
            
$data curl::visible($this->url.$i);

            
$data $this->parse($data);
            
            
$html file_get_content($data);
            
            foreach (
$html->find('.altshade') as $element) {
                
                
$ip preg_replace('/\s/'''$element->children(1)->plaintext);
                
$port preg_replace('/\s/'''$element->children(2)->plaintext);
                
                
$proxylist[] = $ip ':' $port;

            }
            
            
$ran array_rand($proxylist);
                
            
$proxy $proxylist[$ran];
            
        }
        
        return 
$proxy;
    
    }



curl.class.php

PHP Code:
<?php
class curl
{
    
    private 
$url;
    private 
$proxy;
    public 
$error true;

    function 
hidden($url$proxy)
    {
        global 
$error;
        
        
$proxy explode(':'$proxy);
    
        
$ch curl_init();
        
curl_setopt($chCURLOPT_URL$url);
        
curl_setopt($chCURLOPT_RETURNTRANSFER1);
        
curl_setopt($chCURLOPT_PROXY$proxy[0]);
        
curl_setopt($chCURLOPT_PROXYPORT$proxy[1]);
        
curl_setopt($chCURLOPT_CONNECTTIMEOUT15);
        
curl_setopt($chCURLOPT_TIMEOUT15);
        
curl_setopt($chCURLOPT_USERAGENT'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.120 Safari/537.36');
        
curl_setopt($chCURLOPT_HEADER1);
        
        if(
$error == true) {
        
        echo 
'error:' curl_error($ch). PHP_EOL;
        
        }
        
        return 
curl_exec($ch);
        
    }
    
    function 
visible($url)
    {
        global 
$error;
    
        
$ch curl_init();
        
curl_setopt($chCURLOPT_URL$url);
        
curl_setopt($chCURLOPT_RETURNTRANSFER1);
        
curl_setopt($chCURLOPT_CONNECTTIMEOUT15);
        
curl_setopt($chCURLOPT_TIMEOUT15);
        
curl_setopt($chCURLOPT_USERAGENT'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.120 Safari/537.36');
        
curl_setopt($chCURLOPT_HEADER1);
        
        if(
$error == true) {
        
        echo 
'error:' curl_error($ch). PHP_EOL;
        
        }
        
        return 
curl_exec($ch);
    
    }

}

?>


dom.class.php
http://*marked as SPAM*/muEDhXUq


Example
PHP Code:
<?php/*
error_reporting(E_ALL);
ini_set('display_errors', '1');
*/

require_once('src/proxy.class.php');

$console = new proxy();

$proxy $console->grab_proxy();

$data curl::hidden('http://www.ipchicken.com/'$proxy);

echo 
$data;
?>
04-19-2015, 03:30 AM (This post was last modified: 04-19-2015 03:30 AM by Noxon.)
Post: #2
RE: [GET] Hidemyass Proxy Scraper [Source]
Hi, can somebody explain how to install/make work this script?

Thanks in advance
06-08-2015, 02:14 PM
Post: #3
RE: [GET] Hidemyass Proxy Scraper [Source]
proxy.class.php
06-10-2015, 12:48 AM
Post: #4
RE: [GET] Hidemyass Proxy Scraper [Source]
thanks for script




18.gif