Need Help With Cool Domain Name Tool !!!!

Discussion in 'Programming' started by OnSEO, Apr 4, 2005.

  1. #1
    Ok..I have hacked and slashed about 5 different php scripts to make a nice domain lookup tool...... Found HERE

    As you can see the tool will show you some nice info [​IMG]

    What I want to do is make the script feed from a txt file of many domain names.

    And record the results
    And sort results by domain rank (number of total backlink + number of listed pages X PageRank)

    Any body have any thoughts on how to do this...

    Thanks
    Tbase [​IMG]
     
    OnSEO, Apr 4, 2005 IP
  2. City2

    City2 Peon

    Messages:
    542
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #2
    That would be a great idea, if you can make it for multiple domains in a nice table. Although the only problem would be it might get very very slow.
     
    City2, Apr 4, 2005 IP
  3. Will.Spencer

    Will.Spencer NetBuilder

    Messages:
    14,789
    Likes Received:
    1,040
    Best Answers:
    0
    Trophy Points:
    375
    #3
    I tried the tool and received these error mesages:

    Warning: fsockopen(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/efxhost/public_html/dna/include/WhoisDomainCheckup_class.inc.php on line 170

    Warning: fsockopen(): unable to connect to :43 in /home/efxhost/public_html/dna/include/WhoisDomainCheckup_class.inc.php on line 170
     
    Will.Spencer, Apr 4, 2005 IP
  4. OnSEO

    OnSEO Guest

    Messages:
    170
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    It should work fine now...I have been tinkering with it a bit :)
     
    OnSEO, Apr 4, 2005 IP
  5. Will.Spencer

    Will.Spencer NetBuilder

    Messages:
    14,789
    Likes Received:
    1,040
    Best Answers:
    0
    Trophy Points:
    375
    #5
    Cool it works now.

    I must have pissed off another DMOZ editor. The site I used to test showed as not being listed in DMOZ. I checked to see if it was a bug in the tool. Nope, not a bug in the tool...
     
    Will.Spencer, Apr 4, 2005 IP
  6. OnSEO

    OnSEO Guest

    Messages:
    170
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #6
    But do you see what I mean about being able to feed it with a text file (drop list).And then rank them accordingly..

    You could pickup some nice domains that way..
     
    OnSEO, Apr 4, 2005 IP
  7. OnSEO

    OnSEO Guest

    Messages:
    170
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #7
    OK I have 2 things that are driving me nuts.

    First of all the yahoo and google "saturation" is not combined with the total.

    //******************SEARCH SATURATION CHECKER***********************************////
    // SCRIPT START TIME ----------------------------------------------------
    $timeparts = explode(' ', microtime()); $starttime = $timeparts[1].substr($timeparts[0],1);
    // ----------------------------------------------------------------------
    $total = 0;
    
    $pull = array("http://www.", "/"); 
    
    if($whois) {
    $offset = strlen($whois) - 1; 
    if ($whois[$offset] == '/') 
    { 
    $whois[$offset] = ''; 
    }
    $results = array();
    
    // AlltheWeb
    $engine = 'alltheweb';
    $path = 'http://www.alltheweb.com/search?cat=web&collapse=off&_sb_lang=any&type=all&avkw=fogg&q='.str_replace('http://www.','',$whois).'+domain%3A'.str_replace('http://www.','',$whois);
    if(!file_exists($path)) {
    $data = str_replace(' ', ' ', strtolower(strip_tags(@implode('', @file($path))))); //echo $data; // TEST
    if(!strpos($data, 'found that match your query')) {
    $data = substr($data, strpos($data, '| audio')+9, strlen($data)); //echo $data; // TEST
    $data = trim(substr($data, 0, strpos($data, 'results'))); 
    $data = explode(' ', $data);
    $data = $data[(count($data)-1)];
    $results[$engine] = array($data, $path);
    $total+=str_replace(',', '', $data);
    } else {
    $results[$engine] = array('0', $path);
    }
    } else {
    $results[$engine] = array('n/a', $path);
    }
    /*
    // AltaVista
    // for some reason the query does not work if the domain extension (ie: .com, .net, etc.) is used
    $engine = 'altavista';
    $tmp = explode('.', $whois); $tmp = $tmp[0].'.'.$tmp[1];
    $path = 'http://www.altavista.com/web/results?itag=wrx&q=url%3A'.$tmp.'&kgs=1&kls=0';
    if(!file_exists($path)) {
    $data = str_replace(' ', ' ', strtolower(strip_tags(@implode('', @file($path))))); //echo $data; // TEST
    if(!strpos($data, 'found 0 results')) {
    $data = substr($data, strpos($data, 'altavista found')+16, strlen($data)); //echo $data; // TEST
    $data = trim(substr($data, 0, strpos($data, 'results'))); 
    $data = explode(' ', $data);
    $data = $data[(count($data)-1)];
    $results[$engine] = array($data, $path);
    $total+=str_replace(',', '', $data);
    } else {
    $results[$engine] = array('0', $path);
    }
    } else {
    $results[$engine] = array('n/a', $path);
    }
    */
    // Google
    $engine = 'google';
    $path = 'http://www.google.com/search?q=site:'.str_replace('$pull','',$whois).'&hl=en&lr=&ie=UTF-8&filter=0';
    if(!file_exists($path)) {
    $data = str_replace(' ',' ', strtolower(strip_tags(@implode('', @file($path))))); 
    if(!strpos($data, 'did not match any documents')) {
    $data = substr($data, strpos($data, 'web results')+12, strlen($data)); 
    $data = trim(substr($data, 0, strpos($data, 'from'))); //echo $data; // TEST
    $data = explode(' ', $data);
    $data = $data[(count($data)-1)];
    $results[$engine] = array($data, $path);
    $total+=str_replace(',', '', $data);
    } else {
    $results[$engine] = array('0', $path);
    }
    } else {
    $results[$engine] = array('n/a', $path);
    }
    
    
    
    
    
    // MSN Search
    $engine = 'msn';
    $path = 'http://search.msn.com/advresults.aspx?q='.str_replace('http://www.','',$whois).'&adv_dom='.str_replace('http://www.','',$whois);
    if(!file_exists($path)) {
    $data = str_replace(' ', ' ', strtolower(strip_tags(@implode('', @file($path))))); //echo $data; // TEST
    if(!strpos($data, 'no results were found containing')) {
    $data = substr($data, strpos($data, 'of about')+9, strlen($data)); //echo $data; // TEST
    $data = trim(substr($data, 0, strpos($data, 'containing'))); 
    //$data = explode(' ', $data);
    //$data = $data[(count($data)-1)];
    $results[$engine] = array($data, $path);
    $total+=str_replace(',', '', $data);
    } else {
    $results[$engine] = array('0', $path);
    }
    } else {
    $results[$engine] = array('n/a', $path);
    }
    
    // Yahoo!
    // Yahoo! was a little quirky, had to scrape results a little differently
    $engine = 'yahoo';
    $path = 'http://search.yahoo.com/search?p=domain%3A'.str_replace('http://www.','',$whois).'&ei=UTF-8&n=20&fl=0&xargs=0&pstart=1&dups=1';
    if(!file_exists($path)) {
    //$data = str_replace(' ', ' ', strtolower(strip_tags(implode('', @file($path))))); echo $data; // TEST
    $data = @implode('', @file($path)); //echo $data; // TEST
    if(!strpos($data, 'We didn\'t find any Web pages')) {
    $data = substr($data, strpos($data, 'of about')+9, strlen($data)); //echo $data; // TEST
    $data = trim(strip_tags(substr($data, 0, strpos($data, 'for')))); 
    //$data = explode(' ', $data);
    //$data = $data[(count($data)-1)];
    $results[$engine] = array($data, $path);
    $total+=str_replace(',', '', $data);
    } else {
    $results[$engine] = array('0', $path);
    }
    } else {
    $results[$engine] = array('n/a', $path);
    }
    
    // check for listing in DMOZ
    $path ="http://search.dmoz.org/cgi-bin/search?search=".str_replace('http://www.','',$whois);
    if(!file_exists($path)) {
    $data = strip_tags(implode("", file($path)));
    if(strpos($data, "No Open Directory Project results found")) {
    $results['dmoz'] = array('No', $path);
    } else {
    $results['dmoz'] = array('Yes', $path);
    }
    } else {
    $results['dmoz'] = array('n/a', $path);
    }
    
    // check for listing in Zeal
    $path ="http://www.zeal.com/search/results.jhtml?keyword=".str_replace('http://','',$whois)."&scope=directory";
    if(!file_exists($path)) {
    $data = implode("", file($path)); //echo $data; // TEST
    if(strpos($data, "found no results")) {
    $results['zeal'] = array('No', $path);
    } else {
    $results['zeal'] = array('Yes', $path);
    }
    } else {
    $results['zeal'] = array('n/a', $path);
    }
    
    }
    
    </table>
    <table class='standard' width=196 border=0 cellpadding=2 cellspacing=0>
    <tr class='fill01'>
       <td height=25 colspan=2 align='center'><b>Search Engine Saturation </b></td>
    </tr>
    <tr class='fill03'><td height=20 width=93>&nbsp;</td>
    <td width=93 align='right'><b></b></td></tr>
    <tr><td height=20>Present in DMOZ</td><td align='right'><? echo "{$results['dmoz'][0]}"; ?> (<a href='<? echo "{$results['dmoz'][1]}"; ?>' target='_blank'>view</a>)</td></tr>
    <tr class='fill03'><td height=20>Present in Zeal</td><td align='right'><? echo "{$results['zeal'][0]}"; ?> (<a href='<? echo "{$results['zeal'][1]}"; ?>' target='_blank'>view</a>)</td></tr>
    
    <tr class='fill01'><td colspan=2 height=5>&nbsp;</td>
    </tr>
    
    <tr class='fill03'><td height=20>AlltheWeb</td><td align='right'><? echo "{$results['alltheweb'][0]}"; ?> (<a href='<? echo "{$results['alltheweb'][1]}"; ?>' target='_blank'>view</a>)</td></tr>
    <? /*<tr><td height=20>AltaVista</td><td align='right'><? echo "{$results['altavista'][0]}"; ?> (<a href='<? echo "{$results['altavista'][1]}"; ?>' target='_blank'>view</a>) */ ?>
    <tr><td height=20>Google</td><td align='right'><? echo "{$results['google'][0]}"; ?> (<a href='<? echo "{$results['google'][1]}"; ?>' target='_blank'>view</a>)</td></tr>
    
    
    <tr><td height=20>Yahoo!</td><td align='right'><? echo "{$results['yahoo'][0]}"; ?> (<a href='<? echo "{$results['yahoo'][1]}"; ?>' target='_blank'>view</a>)</td></tr>
    
    <tr class='fill01'><td height=25><b>DOMAIN POWER</b></td><td align='right'><b><? echo number_format($total); ?></b></td></tr>
    </table> 
    
    PHP:

    Second...What would be a good way to feed the script with a .txt file and check each domain

    Thanks
     
    OnSEO, Apr 6, 2005 IP
  8. davedx

    davedx Peon

    Messages:
    429
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #8
    
    
    $filename = $_GET['filename'];
    
    $h = fopen( $filename, "r" );
    $contents = fread( $h, filesize( $filename ) );
    fclose( $h );
    
    $domains = explode( "\n", $contents );
    
    for( $i=0; $i<count($domains); $i++)
    {
      check_domain( $domains[$i] );
    }
    
    PHP:
    Also try putting intval() around the str_replace or whichever it is to total up the saturation. :)
     
    davedx, Apr 6, 2005 IP
  9. redking

    redking Member

    Messages:
    93
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    43
    #9
    Nice tool. You need to escape spaces in the input (domain name). Adding a space at the end of domain.com returns errors in your script.
     
    redking, Apr 7, 2005 IP
  10. OnSEO

    OnSEO Guest

    Messages:
    170
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Thank you very much for that....It really helps me

    I will take care of that too.....

    Also I am adding how many times just the domain is searched for in overture :)

    Thanks
     
    OnSEO, Apr 7, 2005 IP
  11. kanutervalve

    kanutervalve Guest

    Messages:
    42
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #11
    what is the "domain power"? what is the scale for that?
     
    kanutervalve, Apr 7, 2005 IP
  12. mjewel

    mjewel Prominent Member

    Messages:
    6,693
    Likes Received:
    514
    Best Answers:
    0
    Trophy Points:
    360
    #12
    It's not showing a site as being DMOZ listed, which it is, but it looks like DMOZ is having problems again.
     
    mjewel, Apr 7, 2005 IP