NAME srcsvc - Server-based service to view the source HTML code of a web page using a browser. SYNOPSIS srcsvc?[url=url-to-use] [&shorttags=yes|no] [&fontsize=num] [&titlesize=num] [&linemax=num] [&titlemax=num] [&indentmax=num] DESCRIPTION *srcsvc* is a Perl program that runs as a CGI script on a web server. It is usually invoked using a bookmarklet while viewing a web page. The returned HTML will be a page that shows the source HTML that makes up the original page. The effect is similar to using "View / Source" or "View / Page Source" in a browser, with some nice additions: * Long lines are broken at a maximum length and wrapped, with the fragments indented appropriately. * href= and src= attribute values are displayed as links that either popup a window (for images), or display the contents listed by this program (html pages, css and Javascript files, etc.). This is useful for looking at the files in a frameset, or reading boilerplate Javascript. * The text is displayed in bold, with markup (tags, etc.) shown normally. This makes it easier to look through code when using the text as a guide. * You can optionally display in "short tags" mode with most HTML tags reduced to just their names, without the attributes or their values shown (except for href and src). This form is useful when you just want to understand the basic structure of a page. Indenting is preserved. * Values in the HTTP header are displayed below the listing. Most of these are not available in normal source listings or page info, since they come from the request itself. These include the server type, last modified date/time, cookies, etc. In addition, the protocol and status values in the response are displayed, along with the URI base. This base may be set by various HTTP/HTML means, and may be the result of redirection (and therefor not correspond to the requested URL). * A configuration file may be used to override default values for a variety of things. OPTIONS Here are the values that may be changed from either the configuration file or in the request. The configuration file must be in the same directory on the server as this program, with the same filename with the addition of ".cfg" at the end. It is a text file in the following format: # comment name1=value1 name2=value2 # optional comment The names of the variables that may be set are: agent The string to be sent with the request for the file to be listed indicating which "Agent" is making the URL request. This is usually the name of a browser or spider. Some servers return different HTML for different agents. Most server logs log this value. The default is "Mozilla/4.0 (compatible)" (without the quotes) and can only be set in the configuration file. fontsize The size in points for the listing. This is used in a CSS style as font-size:fontsizept. The default is 9 (font-size:9pt). linemax The maximum line length in characters. Lines of HTML or text longer than this will be broken at this length, with the remaining fragments indented. The default value is 100. indentmax Fragments of lines that are broken because they are too long are indented to line up appropriately under the start of the line. In some cases this results in very short fragments. This value lets you set the maximum indent. Lines will not be indented more than linemax - indentmax characters. In all cases, the string ". . ." is added to the beginning of the fragment to indicate a continued line. The default is 25. titlesize The size in points for the URL displayed as a title. This is used in a CSS style as font-size:titlesizept. The default is 10 (font-size:10pt). titlemax The URL displayed as a title at the beginning of the page is broken into lines no longer than titlemax characters. The default is 75. shorttags You can optionally display in "short tags" mode with most HTML tags reduced to just their names, without the attributes or their values shown (except for href and src, and "