= "4.2.0"){ extract($_POST); extract($_SERVER); extract($_ENV); } #Submit 'em to AllTheWeb function submit_aw(){ global $urls, $results; $host = "www.alltheweb.com"; for ($i=0; $i"; else{ fputs($socket,"GET $builtpath HTTP/1.0\r\n\r\n"); while (!feof($socket)) $reply .= fgets($socket, 1024); if ( ! (eregi("has been scheduled",$reply)) ) echo "AllTheWeb didn't accept $urls[$i]
"; else { echo "URL number " . ($i + 1) . " ($urls[$i]) submitted OK to AllTheWeb.
"; $results[$i][1] = 1; } flush(); fclose($socket); } } } #Submit 'em to DirectHit function submit_dh(){ global $urls, $results; $host = "www.directhit.com"; for ($i=0; $i"; else{ fputs($socket,"GET $builtpath HTTP/1.0\r\n\r\n"); while (!feof($socket)) $reply .= fgets($socket, 1024); if ( ! (eregi("Thank you",$reply)) ) echo "DirectHit didn't accept $urls[$i]
"; else { echo "URL number " . ($i + 1) . " ($urls[$i]) submitted OK to DirectHit.
"; $results[$i][2] = 1; } flush(); fclose($socket); } } } #Submit 'em to Google function submit_go(){ global $urls, $results; $host = "www.google.com"; for ($i=0; $i"; else{ fputs($socket,"GET $builtpath HTTP/1.0\r\n\r\n"); while (!feof($socket)) $reply .= fgets($socket, 1024); if ( ! (eregi("been successfully added",$reply)) ) echo "Google didn't accept $urls[$i]
"; else { echo "URL number " . ($i + 1) . " ($urls[$i]) submitted OK to Google.
"; $results[$i][3] = 1; } flush(); fclose($socket); } } } #Submit 'em to Lycos function submit_ly(){ global $urls, $results; $host = "www.lycos.com"; for ($i=0; $i"; else{ fputs($socket,"GET $builtpath HTTP/1.0\r\n\r\n"); while (!feof($socket)) $reply .= fgets($socket, 1024); if ( ! (eregi("We successfully spidered",$reply)) ) echo "Lycos didn't accept $urls[$i]
"; else { echo "URL number " . ($i + 1) . " ($urls[$i]) submitted OK to Lycos.
"; $results[$i][4] = 1; } flush(); fclose($socket); } } } #Submit 'em to Northern Light function submit_nl(){ global $urls, $results; $host = "urls.northernlight.com"; for ($i=0; $i"; else{ fputs($socket,"GET $builtpath HTTP/1.0\r\n\r\n"); while (!feof($socket)) $reply .= fgets($socket, 1024); if ( ! (eregi("Thank you for your URL",$reply)) ) echo "Northern Light didn't accept $urls[$i]
"; else { echo "URL number " . ($i + 1) . " ($urls[$i]) submitted OK to Northern Light.
"; $results[$i][5] = 1; } flush(); fclose($socket); } } } #Submit 'em to SearchIt function submit_si(){ global $urls, $results; $host = "index.searchit.com"; for ($i=0; $i"; else{ fputs($socket,"GET $builtpath HTTP/1.0\r\n\r\n"); while (!feof($socket)) $reply .= fgets($socket, 1024); if ( ! (eregi("will be indexed shortly",$reply)) ) echo "SearchIt didn't accept $urls[$i]
"; else { echo "URL number " . ($i + 1) . " ($urls[$i]) submitted OK to SearchIt.
"; $results[$i][6] = 1; } flush(); fclose($socket); } } } #Submit 'em to SplatSearch function submit_sp(){ global $urls, $results; $host = "www.splatsearch.com"; for ($i=0; $i"; else{ $header = "Host: www.splatsearch.com\r\nConnection: close\r\n"; fputs($socket,"GET $builtpath HTTP/1.1\r\n$header\r\n"); while (!feof($socket)) $reply .= fgets($socket, 1024); if ( ! (eregi("thankyou.html",$reply)) ) echo "SplatSearch didn't accept $urls[$i]
"; else { echo "URL number " . ($i + 1) . " ($urls[$i]) submitted OK to SplatSearch.
"; $results[$i][7] = 1; } flush(); fclose($socket); } } } #Entry point if (!$posted){ echo <<BatchSubmit! Batch URL Submission

BatchSubmit v1.1(sockets)

URLs File:
Select Engines:
AllTheWeb | DirectHit
Google | Lycos
Northern Light | SearchIt
SplatSearch
  
EOT; exit; } if ($posted){ $urls = join("",file("$urlfile")); $urls = split("\n",trim($urls)); $currdate = date("m/d/y h:i:s A"); $numurls = sizeof($urls); echo << BatchSubmit Results Page

BatchSubmit v1.1

This page was generated by BatchSubmit v1.1. It contains the full details of your batch URL submission. Each submission attempt was recorded on its own line, with a note indicating success or failure. At the end of the page, you'll find a chart which gives a visual representation of success vs. failure. The more URLs you submitted, the larger this page will be and the longer it will take to load.

Possible reasons for failure: Some engines, like Lycos, verify that a URL exists before they accept it. Other search engines, like Northern Light, accept URLs whether they're valid or not; bad URLs are sorted out later when the indexing takes place. If an attempt is marked as "not accepted," the most likely causes are that the URL was invalid or the search engine timed-out trying to load your page.

Here are your BatchSubmit results:

Starting up ($currdate)... read $numurls URLs from $urlfile.

EOT; flush(); if($alltheweb) submit_aw(); if($directhit) submit_dh(); if($google) submit_go(); if($lycos) submit_ly(); if($northernlight) submit_nl(); if($searchit) submit_si(); if($splat) submit_sp(); echo <<
Visual Results: Green = Submitted OK; Red = Submission Failed.
Key: AW = AllTheWeb; DH = DirectHit; GO = Google; LY = Lycos; NL = NorthernLight, SI = SearchIt, SP = SplatSearch.


EOT; for($i=0;$i"; for ($c=1;$c<=7;$c++){ if ($results[$i][$c]) echo ""; else echo ""; } echo ""; } echo "
URL #
AW
DH
GO
LY
NL
SI
SP
"; echo "" . ($i + 1) . "  


"; $currdate = date("m/d/y h:i:s A"); echo <<
Shutting down ($currdate)...


Report generated by BatchSubmit.

EOT; } ?> "; #else{ # fputs($socket,"GET $builtpath HTTP/1.0\r\n\r\n"); # while (!feof($socket)) # $reply .= fgets($socket, 1024); # if ( ! (eregi("Thank you for your",$reply)) ) # echo "Altavista didn't accept $urls[$i]
"; # else { # echo "URL number " . ($i + 1) . " ($urls[$i]) submitted OK to Altavista.
"; # $results[$i][1] = 1; # } # flush(); # fclose($socket); # } # } #} #Submit 'em to Canada.com (Inktomi seed) #DISABLED - Canada.com no longer accepts direct submissions # DirectHit is the new Inktomi seed being used #function submit_ca(){ #global $urls, $results; #$host = "www.canada.com"; #for ($i=0; $i"; #else{ # fputs($socket,"GET $builtpath HTTP/1.0\r\n\r\n"); # while (!feof($socket)) # $reply .= fgets($socket, 1024); # if ( ! (eregi("URL will be crawled and added",$reply)) ) # echo "Canada.com didn't accept $urls[$i]
"; # else { # echo "URL number " . ($i + 1) . " ($urls[$i]) submitted OK to Canada.com.
"; # $results[$i][3] = 1; # } # flush(); # fclose($socket); # } # } #} #DISABLED - Infoseek is going out of business, why bother submitting #Submit 'em to Infoseek/Go.com #function submit_go(){ #global $urls, $results; #for ($i=0; $i"; # if ( ! (eregi("successfully submitted and is queued",$reply)) ) # echo "Infoseek/Go.com didn't accept $urls[$i]
"; # else{ # echo "URL number " . ($i + 1) . " ($urls[$i]) submitted OK to Infoseek/Go.com
"; # $results[$i][5] = 1; # } # flush(); # } #} #DISABLED - Excite.com now requires payola to be submitted (Overture) #Submit 'em to Excite #function submit_ex(){ #global $urls, $results; #$host = "www.excite.com"; #for ($i=0; $i"; #else{ # fputs($socket,"GET $builtpath HTTP/1.0\r\n\r\n"); # while (!feof($socket)) # $reply .= fgets($socket, 1024); # #Excite gives us a 302 Found with "thanks" in the URL, so we look for that # if ( ! (eregi("thanks",$reply)) ) # echo "Excite didn't accept $urls[$i]
"; # else { # echo "URL number " . ($i + 1) . " ($urls[$i]) submitted OK to Excite.
"; # $results[$i][3] = 1; # } # flush(); # fclose($socket); # } # } #} #DISABLED - HotBot no longer takes submissions (?) #Submit 'em to HotBot #function submit_hb(){ #global $urls, $results; #$host = "hotbot.lycos.com"; #for ($i=0; $i"; #else{ # fputs($socket,"GET $builtpath HTTP/1.0\r\n\r\n"); # while (!feof($socket)) # $reply .= fgets($socket, 1024); # if ( ! (eregi("Web site added",$reply)) ) # echo "HotBot didn't accept $urls[$i]
"; # else { # echo "URL number " . ($i + 1) . " ($urls[$i]) submitted OK to HotBot.
"; # $results[$i][4] = 1; # } # flush(); # fclose($socket); # } # } #} ?>