View Single Post
Old 05-04-2009, 10:36 PM  
ProG
Confirmed User
 
Join Date: Apr 2009
Posts: 1,319
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.
ProG is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote