View Single Post
Old 05-04-2009, 10:48 PM  
qwe
Confirmed User
 
Join Date: Jul 2003
Posts: 2,109
Quote:
Originally Posted by ProG View Post
I'll chime in...

PHP Code:
<?php
    $search 
"google"// Your seach string
    
$pass "";
    
$fail "";
    
    if ( ( 
$websites file"websites.txt" ) ) !== false )
    {
        foreach( 
$websites as $url )
        {
            
$url trim$url );
            
$contents file_get_contents$url );
            if ( ( 
strpos$contents$search ) ) !== false )
            {
                
$pass .= "{$url}\n";
            }
            else
            {
                
$fail .= "{$url}\n";
            }
        }
    }
    
    if ( ( 
$handle fopen"valid.txt"'at' ) ) !== false )
    {
        
fwrite$handle$pass );
        
fclose$handle );
    }
    
    if ( ( 
$handle fopen"bad.txt"'at' ) ) !== false )
    {
        
fwrite$handle$fail );
        
fclose$handle );
    }
?>
You will need openssl. Click your Wampserver icon, goto PHP settings, goto PHP extensions, and click on php_openssl. Then restart the Apache service. Enjoy.
hey bro thanks again one small thing, anyway to make it load 1 url at a time instead of all at once? like it will load one url and checks it before going to next one? also anyway to add a timeout between each check?

leave your epass id as well
qwe is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote