Services & Utilities ...
-
Web Hosting: Readyhosting.com (1-888-257-2052)
49$ per Year
This site is
hosted by
Readyhosting.com out of Kenosha, WI. Click here to
read my review of their services.
-
Mozilla Firefox
Firefox is by far my favorite web browser. I only use IE when I absolutely
have to. Firefox is very straight-forward and easy to use and is less prone to
hacking than Internet Explorer.
-
Microsoft Internet Explorer
Whether
you like it or not, it's the most popular browser in the
world (Bill's not a billionaire for nothing). I stopped using IE after
discovering Firefox (see above).
- Web Buttons: Button Studio by Interkodex
20$ Shareware
This handy program allows for quick generation of button images. It allows
for a number of settings including button shape, color, background color (so the
border area of the button blends in well with the page's background color and
doesn't appear choppy around the edges). Here's
the Button Studio file I use for most of my buttons. You'll need to
download Button Studio to open it. I purchased (registered) this program in
2001.
-
Cascading Style Sheets
The World Wide Web
Consortium's style sheet standards (technology). I use CSS's now instead
of Microsoft FrontPage themes.
-
Microsoft FrontPage
There are probably much better GUI HTML editors out there, but this is the one I
started with and haven't taken the plunge into evaluating anything else yet.
I actually don't use it much any more because I like UltraEdit32 much better
(see below). I still use FrontPage for prototyping and for assigning the
transparent color attribute to .gif images.
-
UltraEdit32
35$ Shareware
My favorite text editor. It's what I "coded" all my pages with (including
this one). I was pleasantly surprised to find out that the developer is
a fellow Christian. He gives a great testimony as to how the program
came about. Click here to read it. I recently purchased an upgrade
(version 8.20) through my company (Duracell). One of the coolest things I do
with it is this: Hit Ctrl-F9 to instantly FTP the current file up to my web server
(it's how I updated and uploaded this file!).
E-mail me and I'll tell you
how I set this up.
-
SmartFTP
FREEWARE!
The great freeware FTP Client that I use. Feature rich, easy to use (and re-use),
oh, and it's FREE (beat that!).
|
|
|
 |
Content Technologies ...
-
ASP
ASP (Active Server Pages) is a server-side scripting language that I use extensively at this site.
For information about ASP, visit http://www.asp-help.com/.
-
HTML & JavaScript
For my client-side scripting, I use JavaScript.
-
The CraigWhite.net Text Graphic
FREE! - rendered online using a utility called Xara3D Sampler (http://www.graphicsring.com/software.html)
-
Divisions on Pages
The sections of content surrounded by thin blue lines (like on this page) is just
an implementation of HTML tables. Click here for an in-depth explanation.
-
Common Layout (Web Style)
You may notice that I use (reuse) several common "objects" at this site such as the
menu system at the top of the page and the footer below. I also have things I
call Mini Windows and Mini Frames. The "Verse of the Day" featured at my home page
(home.asp) is placed inside a "Mini Window". For a closer
look at how I accomplish some of the common look-and-feel at my site click
here.
-
Dynamic Content
On several pages at this site you will notice that I'm "borrowing" live content from other sites in
a process I call "web scraping".
This is done using some code snippets (functions and subroutines) that I've written in .asp that utilize
Microsoft's XML Parser. Click here to jump down to my Web Scraping Tutorial.
I also have an Online Web Scraper where you can see firsthand how
fun and easy it is to scrape content from another site and display it at your own!
-
Time-based Content Refreshing
Some of my "borrowed" content does not need to be refreshed every time the page
is browsed. The "Verse of the Day" featured at my home page (home.asp),
for instance, only needs to be refreshed once a day. I accomplish this
time-saving feature by using an .asp application() level variable along with two
other technical feats:
- Web Scraping (see previous heading)
- Writing the "scraped" HTML to local files on my web server (a process I call
"content capturing".
For a detailed look at how I do this, click here.
|
|
|
 |
|
Hosting Service Review: Readyhosting.com [Back to Top]
Unofficial Help Site for Readyhosting.com:
http://www.readyhelp.net (A very
informative site -- Thanks, Sam S.!)
Until late June 2002, this site was a subweb of www.specright.com,
owned by SpecRight, Inc. -- thanks for the space! Then, I decided to purchase my own domain, www.craigwhite.net. I was already
extremely pleased with their service at my business site, so I naturally went with them for my new domain. Since I already paid the
full $99 a year for my business account, I got craigwhite.net for half price ($50 per year). Also, Readyhosting.com pays my
registration fee for my new domain (as they do my business account). They have some kind of agreement with Network Solutions or
something (I guess). But you heard right, I'll never have to pay an annual fee for my domains!
Readyhosting.com offers MS-Win2K hosting which allows me full use of my .asp
expertise. The package comes with 500MB of disk space (unmetered traffic),
unlimited email aliases, and several other kudos. Their servers already have several .asp components installed and
ready for use including ASPEmail, ASPUpload, and others.
The servers are "development ready" for FrontPage, Cold Fusion, Real
Audio/Video, and more. Their service costs $99 for one year ($8.33 per
month). To view my log on their service performance clicke
here.
Before going
with Readyhosting.com, I was a very unsatisfied customer of Webhosting.com.
Not only was my site inaccessible at any given time, but they even lost my
content once during a "server upgrade" of some sort (some
upgrade!). Twice my password changed without notice. Also, their
service desk was never (not an exaggeration) able to help me immediately.
They acted as an answering service by relaying my every request to another
party. Furthermore, each and every request had to be "escalated"
before it was serviced. This meant me, not their answering service,
revisiting the support site and manually requesting so. Guess some people
still operate under the "squeaky wheel" philosophy. My guess is
they'll be out of business soon, or hopefully (for them) bought out by somebody
who knows what they're doing ... like Readyhosting.com.
|
|
 |
|
Separating Content with Lines [Back to Top]
This trick is accomplished simply by using plain HTML and a 1x1 (pixel) transparent .gif image
(not really a trick at all).
|
Illustration #1:
|
|
Content for Cell 1
|
 |
Content for Cell 2
|
 |
|
Content for Cell 3
|
|
|
Notice that the lines are touching (there are no gaps). This is accomplished by setting the
cellpadding,
cellspacing, and
border
elements of the <table> tag to 0.
Also note that anywhere a line is visible, it's actually a cell (<td>...</td> pair) that
contains the transparent .gif image (dot.gif) and whose <bgcolor> has been set to the desired line
color. Play around with (copy & paste) the following code and see what happens when you change the <table>
element values from 0 to something else. To change the line color all you have to do is
change the bgcolor value of the two <td> elements. And to change the line
thickness, change the width or height elements of the <img> tag.
<table cellpadding=0 cellspacing=0 border=0>
<tr>
<td>
Content for Cell 1
</td>
<td bgcolor=darkslateblue>
<img src=images/dot.gif>
</td>
<td>
Content for Cell 2
</td>
</tr>
<tr>
<td colspan=3 bgcolor=darkslateblue>
<img src=images/dot.gif>
</td>
</tr>
<tr>
<td colspan=3 align=center>
Content for Cell 3
</td>
</tr>
</table>
| |
|
|
Illustration #2:
|
|
|
|
Notice now that the lines are still touching but the content is no longer uncomfortably close to the lines.
This is done by simply placing the content inside of its own table and setting its cellspacing element to 5
(or whatever you want your margin to be). Examine the HTML below:
<table cellpadding=0 cellspacing=0 border=0>
<tr>
<td>
<table cellspacing=5>
<tr>
<td>
Content for Cell 1
</td>
</tr>
</table>
</td>
<td bgcolor=darkslateblue>
<img src=images/dot.gif>
</td>
<td>
<table cellspacing=5>
<tr>
<td>
Content for Cell 2
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan=3 bgcolor=darkslateblue>
<img src=images/dot.gif>
</td>
</tr>
<tr>
<td colspan=3 align=center>
<table cellspacing=5>
<tr>
<td>
Content for Cell 3
</td>
</tr>
</table>
</td>
</tr>
</table>
| |
|
|
|
 |
|
Web Scraping Tutorial [Back to Top]
Here is a mini-tutorial showcasing a few useful .asp functions I wrote that
"scrape" and manipulate content from other web sites. For those who want to skip the
tutorial and just download the source code, click here.
I also have an Online Web Scraper
that lets you do your own scraping right from your browser (you specify the page
to scrape and the text you want to pull in).
A Basic Example: "Current Conditions" Weather Image
I thought it would be nice to display a "current conditions"
weather icon on my site. I looked up the weather for my zip code at http://www.weather.com.
The following page came up after I put in my zip code: http://www.weather.com/weather/local/37312?lswe=37312&lwsa=WeatherLocalUndeclared.
It had a nice graphic (color 52x52 .gif image) just like I wanted. Then I
viewed the source for the page and found that the image itself was being displayed with:
<IMG SRC="http://image.weather.com/web/common/wxicons/52/28.gif" width="52" height="52" BORDER="0" ALT="Mostly Cloudy">
I assumed that the <IMG SRC="http://image.weather.com/web/common/wxicons/52/
portion of the tag would stay the same and only the remaining 28.gif" width="52" height="52" BORDER="0" ALT="Mostly Cloudy">
would change depending on the weather (some guesswork is
required in this type of exercise).
Next, I searched the source to make sure <IMG SRC="http://image.weather.com/web/common/wxicons/52/ was only found once in the page or that the first occurrence of the
tag that I wanted. Lucky for me, it was the only one on the page. So now,
I knew I needed to do the following:
- Scrape (download) the page into a string variable (using my
getHTML() function).
- Isolate the image tag (using my
scrapetext() function):
- Excluding everything before
<IMG SRC="http://image.weather.com/web/common/wxicons/52/
- Excluding everything after the
> character that ended the image tag
Here's the code to do this:
<!--#include file="include/scraper.inc"-->
<%
' first step: get the page ...
thepage = "http://www.weather.com/weather/local/37312?lswe=37312&lwsa=WeatherLocalUndeclared"
thepage = getHTML(thepage)
' second step: isolate the image tag ...
look4 = "<IMG SRC=""http://image.weather.com/web/common/wxicons/52/"
goback2 = "<IMG"
goforward2 = ">"
theimage = scrapetext(thepage, look4, goback2, goforward2, true)
' now, show the output (the actual image) ...
response.write theimage
%>
View/Download (use your browser's "save link
as" feature to download)
- scraper.zip
Contains the following functions:
- getHTML()
- scrapetext()
- striptext()
- swaptext()
- inserttext()
- proxy.zip
You may also want to try these functions if you have to go through a proxy server:
- getHTMLViaProxy()
- getImageViaProxy()
|
|
 |
|
Time-Based Dynamic Content (Content Capturing) [Back to Top]
Content capturing is the process of scraping HTML content from other web sites and then
saving that content to files on your own web server. See the section above on
Web Scraping for a detailed explanation of the first step to
content capturing.
For it to be "time-based" content, obviously there has to be a way to determine how much
time has elapsed since the content was last "captured". This is accomplished using
an .asp application variable whose value is a date & time stamp. .asp application variables are similar to session
variables except that application variables stay alive and are visible across all
sessions. This means that no matter how many active browsers are at your site,
they all will see application("date") as the same value. In fact,
until their values are manually reassigned or "blanked out", an application variable
will maintain its value until the web server is restarted.
At this site each time a page with time-based content is visited, the following takes place
to determine whether its content should be updated (re-scraped).
- If
application("date") is blank, then its value is set to yesterday's
date. This means that the content will probably be updated since the longest time I
allow between updates is 12 hours.
- Evaluate how much time has elapsed between the current time and
application("date").
If more than the desired time has elapsed, then the content is updated.
- If the content was updated, then the
application("date") variable is reset
to the current time.
Note that when I say, "the content is updated", that means that the content is first re-scraped
and then re-saved as a local file. As an example, below is the source code for how
the "Verse of the Day" is evaluated and updated each time someone visits home.asp.
<%
if application("date") = "" then application("date") = date() - 1
' Refresh if it's been 12 hours or more ...
if datediff("h", cdate(application("date")), now()) >= 12 then
' Step 1: Get & Manipulate HTML ...
votd = getHTML("http://www.verseoftheday.com/verse.js")
if votd = "" then
votd = "<i>Unavailable</i>"
else
look4 = "document.write("""
back2 = "document.write("""
back2 = "/<a href=http://www.verseoftheday.com/copyright.html"
verse = scrapetext(votd, look4, back2, up2, false)
verse = replace(verse, "<DIV ALIGN=right><font size=1>", "")
verse = replace(verse, "\", "")
votd = replace(verse, "<br>", " -- <i>") & "</i>"
end if
' Step 2: Save the content locally ...
call text2file(votd, server.mappath(".") & "\" & "votd.inc")
application("date") = now() ' reset the app var
end if
%>
|
|