PLEASE note: These pages are here solely for historic purposes. New articles have not been written since 2001; many links in the index are broken; and most ahref.com email addresses will now bounce. Try visiting ep Productions, Incorporated, the web programming and development company behind this site.

Tip: Talk with other developers in the discussion forums.

web index ahref.com: a community space for web developers------ -----
IndexToolsCareersTalk
ahref.com > Guides > Technology

Technology Guide

Building a Site Submission Program, Continued

More Variable Setup

Lines 67-70 create and define a new UserAgent object using the LWP::UserAgent module. Line 68 gives our agent a name; this name will show up in the search engines' access logs and let them know what program was used to access their sites. Line 69 attaches an email address to the agent, so that the remote sites will know who to email if there is a problem. Line 70 sets the timeout value of the agent to 90 seconds. By default, an agent waits three minutes after accessing a page for the remote server's response. In our version of this program, we're using a default of 90 seconds (we're a little impatient).

 67 my $ua = new LWP::UserAgent;
 68 $ua->agent ("ahref.com multisubmit 1.0");
 69 $ua->from ("piou\@ahref.com");
 70 $ua->timeout (90);

Lines 72-78 customize the program's output for our site a little bit more. We don't include this text in our header file because the header file might be used for other programs for which this text doesn't apply.

 72 $output_string = "<BLOCKQUOTE><FONT SIZE=\"2\"><A HREF=\"/index.html\">";
 73 $output_string .= "<B>Anchor</B></A> > <A HREF=\"/guides/index.html\">Guides</A> > ";
 74 $output_string .= "<A HREF=\"/guides/industry/index.html\">Industry</A> > ";
 75 $output_string .= "Planting Seeds in All the Right Places<P></FONT>\n";
 76 $output_string .= "<IMG SRC=\"/images/indyguideheader.gif\" ALT=\"Industry Guide\" ";
 77 $output_string .= "ALIGN=BOTTOM WIDTH=\"455\" HEIGHT=\"61\" BORDER=\"0\">\n";
 78 $output_string .= "<BR>\n<H3>Site Submitter Results</H3>\n";
continue reading >>>
or jump to a topic:

Introduction
Preliminaries
Input Validation
Defining the Search Engines
More Variable Setup
Making the Submissions
Finishing Up
Things to Keep in Mind


view a printable version of this article


To suggest a topic, please email guides@ahref.com.

 


HOME ||| ABOUT AHREF.COM ||| ADVERTISE ||| FEEDBACK ||| SEARCH THIS SITE ||| CONTRIBUTE

© 1998-1999 ep Productions, Inc. All rights reserved. Terms of use.