Industry guru Dave Taylor answers questions about a wide variety of technical topics, including SEO, Google AdSense, Unix, Linux, MySpace, blogging, mp3 players, Mac OS X, shell scripting, Vista and Microsoft Windows.

CGI Scripts and Web Site Programming

How do I add a Google Images search to my site?

You seem to be the wizard of unwrapping searches on sites and showing how to add them on our own Web sites, which is awesome. I saw - and really liked - your article on how to add a Google search box to my site but instead of searching Google, I want to search Google Images. Doable?

CGI Scripts and Web Site Programming

How do I reverse engineer a complicated Web form?

I'm making a website that helps kids at my school find nearby restaurants. I wanted directions by bus, and there's a Trip Planner site that will plan the bus trip. How can I make it so that visitors can click the link and have the starting and ending addresses pre-filled in?

CGI Scripts and Web Site Programming

How do I make my Web site a wiki?

I've been talking with a lot of my peers and become very interested in wikis. I love the idea of pure collaboration and as I have my own Linux server box, I'd love to be able to just install a wiki application on my box and play with it, but I am lost at that point. How do you figure out what wiki app to use and install it?

CGI Scripts and Web Site Programming

How can I add a YouTube search to my site?

I'm addicted. First it was America's Funniest Home Videos, now it's YouTube. There are just too darn many hilarious videos on the site. What I really want, though, is to be able to add a YouTube search to my own site so people can easily find all the funny stuff there. Is that doable?

CGI Scripts and Web Site Programming

What's the difference between Flash and Shockwave?

I want to add some high-end animation and transitions to my Web site and figure that I need something written in Flash. I also want to add a fun game to the site. That, my friends tell me, should be written in Shockwave. Now I'm confused. What is the difference between Flash and Shockwave?

Blogs and RSS Feeds

How do I add a Lijit search widget to my site?

I know you have shown how to add a Google search box and such to my site (see Add Google search to your site) and even saw that you've written about how to utilize Google Custom Search (see Add Google Custom Search to your site), but I want to implement a cool widget I saw on another site from Lijit. Do you have any info on that?

CGI Scripts and Web Site Programming

How can I add "translate into" country flags to my pages?

I just saw your cool article on how to add a pull-down menu letting people translate the pages of my Web site into any of a dozen different languages (see make your site available in multiple languages) but I would prefer to have tiny little flags for different languages and when someone clicks on the flag, the page is translated into that language. Know what I mean? Can you do that and still use Google Translate?

CGI Scripts and Web Site Programming

How can I make my site available in multiple languages?

I know that it's not optimal, but I want to make the product information pages on my online store available in a bunch of different languages without paying the major bucks to get a professional translator to maintain them. I know that services like Babelfish let you enter a URL and get the contents translated automatically, but is there some way to hook that into a site directly?

CGI Scripts and Web Site Programming

How can I add a custom Google search engine to my site?

I've seen some very nice Google-sponsored search systems on sites like StickerGiant and am wondering how hard that is to implement? I know you've written about how to add a Google search box on your site (see How to add a Google search box to your site), but I'm talking about how to have the search results on my site itself.

Articles and Reviews

How to create a custom Apple iPhone icon for your Web site

One of the features added to the latest revision of the Apple iPhone operating system that's garnered quite a bit of attention is the ability to save Web page bookmark icons directly on the main screen of the phone. Experimentation reveals that some sites have cool icons while most are just miniature representations of the Web site. What's the difference? Read on and find out, including step-by-step directions on how you can easily ensure your own site (or blog!) has a custom iPhone icon too.

CGI Scripts and Web Site Programming

Modifying search strings on Google site search?

I saw your answer regarding how to modify a Google search box to only look through a specified subdirectory on my site (see Search only subdirectory in Google) and it's interesting, but where's the actual code? I need something I can cut and paste, please!

CGI Scripts and Web Site Programming

How can my Google site search just look in a subdirectory?

Hi Dave. Maybe I've missed this somewhere, but how do I get the search to only look at one directory in my domain? I'm looking for it to only search files in my help file, but not to look in the rest of the site. I'm unsuccessful. I looked at that bot thing, and i didn't see an answer [cf how to add a Google search box to your site]

So, for example, it currently looks at www.mywebsite.com, but I want it to look at www.mywebsite.com/directoryA. Is there a way to do that? Entering that path simply returns 0 results.

CGI Scripts and Web Site Programming

How do I add a second site to my Google Analytics account?

I've been using Google Analytics to track what's going on with my main Web site and now have a second site. Is there some easy way to have Analytics track both, or do I need to sign up for a second account?

CGI Scripts and Web Site Programming

How do I create a custom bookmark that grabs the current URL?

I've seen a number of different sites where you can drag a link onto your bookmark bar in a browser and then have that bookmark act as a tiny little program that grabs and sends specific information. I want one like that for a bookmark program of my own, where I have a CGI backend and want to be able to visit a page, click on my link, and have the URL of that page handed to my script. Does that make sense?

Auctions and Online Shopping

How can I add an eBay search box that searches titles and descriptions?

Dave, I got the search box into my site (as detailed here: Add an eBay search box to your Web site) but I need to be able to use it to search both title and description. I have not had any luck getting that part in. I need this because I encode the description of an eBay listing with a specific number giving my customers an easy way to look at their items only. Thanks for the help

CGI Scripts and Web Site Programming

How can I create predefined Amazon search links?

I read your note about how to add an Amazon.com search box to your site and it's very cool, but what I want to know is: What if I want the search to only search a certain keyword, Example "Honda Parts"?

CGI Scripts and Web Site Programming

How do I detect an iPhone user coming to my site?

Amazon.com's jumped on the wagon, and Meebo has too: they automatically give you a different version of their site if you're browsing from an Apple iPhone. I want to do that too. How the heck do I detect that a visitor has an iPhone?

Shell Script Programming

How do I create a custom stock market index?

My boss had a great suggestion for our local business web site: create a stock index like the S&P 500 that's just comprised of companies in our area. He said we should add it to our site but I honestly have no idea how to do that. Help!

Business and Management

Can Hacker Safe, TRUSTe, BBB, and Trust Guard Seals Actually Improve My Sales?

I'm looking to improve the close rate on my ecommerce site and have noticed that many successful online stores have various trust, security and hacker-proof seals and certifications. How do they work, which are worthwhile, and how much do they cost? Most importantly, will adding one of these actually improve my online sales?

CGI Scripts and Web Site Programming

Can I capture Google searches on my site?

I see you've posted articles explaining how to put a Google Search Box and Search Results on a website. (see add Google search to your site). But is it possible to be able to store the search phrases typed into the Google search boxes? This way I can analyze the data to know what people are searching for, then create more content on that subject.

CGI Scripts and Web Site Programming

Can I add Public Google Calendar Search to my site?

I'm intrigued by Google Calendar's public calendar search capability and am wondering if there's any way to reverse engineer it and add it to my own site. Possible?

CGI Scripts and Web Site Programming

How can I make the text adjacent to my checkbox clickable?

I've noticed that on some of the more slick Web 2.0-style Web sites, you can click on the text description adjacent to a checkbox and have it act as if you'd clicked on the checkbox itself, just as you can with regular Windows dialog box elements. How the heck do they do that?

CGI Scripts and Web Site Programming

What is Web 2.0 and what Web 2.0 stuff should I add to my site?

CGI Scripts and Web Site Programming

Can I add a Wikipedia search box to my Web site or blog?

I found instructions for adding a cool Google search box to an html/xhtml site, here on askdavetaylor. I want to add a similar Wikipedia search box to my website. Any advice on where I can get code to do this?

CGI Scripts and Web Site Programming

How do I add Windows Live Search to my Blog?

Microsoft Windows Live SearchYou seem to have figured out how to add just about any search box to a Web site, Dave, so I'm hoping you can give me step-by-step instructions on how to add Microsoft's new Live Search Box to my site. Thanks.

CGI Scripts and Web Site Programming

Can I create an Apache image directory browser script?

I run a fairly busy Web site with a variety of different image directories. The problem is, Apache shows directories in a fairly rudimentary way which makes it quite difficult to find a specific image if I don't remember its name. Is there a better way with some sort of shell scripting?

Search Engine Optimization

How can I get Google search results on my site?

I have been using Google's AdSense for Search program for a while now and having some okay results with it. What I'm wondering is whether it's possible to have the search results appear on a page on my site, rather than losing the traffic to the Google system?

CGI Scripts and Web Site Programming

How do I add a Drugstore.com search to my Web site?

I really like the Google search box you demonstrate on this site, but I want to add a search box on my site for Drugstore.com, and can't figure out how to do it. I thought I had it all working, but it's not. Can you help me out? I'll be forever in your debt!

HTML and CSS

How do I use JavaScript to break out of frames?

I'm really upset. I was just visiting a competitors Web site and found out that they had links to my FAQ pages, but when you clicked on the links, their "frame" neatly wrapped my content, which made it seem like it was their content, not mine. That stinks, and I want to know if there's a way that I can kill or prevent this from happening to my Web pages?

CGI Scripts and Web Site Programming

How do I add stock quotes to my Web page?

I would like to add the days current stock on my web page. I read your answer to someones questions about adding the current weather, I would like to do the same but with stocks.

Auctions and Online Shopping

How do I add "buy now" buttons with Google Checkout?

I just read about Google Checkout (at your site, actually: Introducing Google Checkout and I"m inspired to add "buy now" buttons for this service to my page in addition to the Paypal buttons I already have. Can you step me through the process, please?

CGI Scripts and Web Site Programming

How can I add a Froogle search box to my site?

I saw your article about adding an eBay search box to your site - very cool - and would like to find out how I can add a search box for Google's Froogle shopping service to my page. Ideally, I'd like to have it open up in a new window when someone does a search. Can you help me out?

CGI Scripts and Web Site Programming

How do I add a 301 redirect to my Apache httpd.conf?

I just checked and apparently both the "domain.com" and "www.domain.com" work for my site, bringing up the same page with different URLs. According to an SEO buddy of mine, that's a bad thing. Is it? And if so, how can I tweak my web server configuration to fix it?

CGI Scripts and Web Site Programming

How do I get local time with the PHP time function?

Hello I have a website and I show the time using:

<?php
\011

$fecha = time ();
\011echo "Date: " . date ( "j/m/Y" )."&nbsp;&nbsp;";
\011echo "Time: " .

date ( "h:i A" , $date )

But the time in my webserver is different from my time and I wanna display my time in my website, how can I modify the time? for example if the time in my server says 5pm i want to show 6pm

Blogs and RSS Feeds

How can I add the Ask Dave Taylor RSS feed on my Web site?

I hate to sound like a groupie or something, but I love your site, Dave, and I'd love to be able to include a little box somewhere on my own site that featured your latest entries! Is this doable, and if so, how do I do it?

Sony PSP, MP3 Players, Etc.

How do I detect the Sony PSP Web browser on my site?

I'm looking to make a Sony PSP optimized website, but I want it so that it can only be viewed by the PSP and if viewed in a normal pc internet browser, you have a message saying "please visit us using your psp" or something along those lines. How do I do that?

CGI Scripts and Web Site Programming

How do I add current weather to my website?

I have a new Web site and I'd really like to be able to add a little weather "bug" to it so people can check on the weather in my neighborhood. I've looked at some sites that offer weather forecasts but am completely befuddled. How do I add a weather forecast box to my Web site?

CGI Scripts and Web Site Programming

phpBB trick for including Google AdSense between articles?

I'm running phpBB for my site discussion forums and really like it, but I'd like to slip some advertising between forum posts #1 and #2 on my pages. For the life of me, though, I just can't figure it out. Can you help out?

CGI Scripts and Web Site Programming

What is Ajax?

I've been hearing a bit of a buzz lately about a new Web technology called Ajax, but I have no idea what it is or even how to find out more about it. Help?

CGI Scripts and Web Site Programming

How do I add the Technorati search box to my Web site?

My question is about the Technorati search box. How do I move the search box over to the right so it's not jutting outside the sidebar?

CGI Scripts and Web Site Programming

How does CGI work?

I maintain a website for a grammar school and I would like to put a form in on our alumni page with their name, graduating year and email address. I can create the form on Frontpage or Dreamweaver, but I don't quite get how the info is sent out. I would like the info sent to a particular email address but I don't know where to put that email address. Can you help?

CGI Scripts and Web Site Programming

What's a fast way to add a shopping cart to my site?

Dave, I have a few different books and audio CDs I'd like to sell and am wondering if you can recommend a quick and fast way for me to add some sort of an online store on my Web site so it's "commerce enabled", even a rudimentary one?

CGI Scripts and Web Site Programming

Using PHP to create a membership Web site?

I would like your recommendation on integrating php scripts on the website to create free membership or paid membership access only web pages. Are there any books that teach you how to do that in the most simplest way? I'm quite new to website building and still in the process of learning html. I would appreciate your advice. Thank you.

CGI Scripts and Web Site Programming

Technorati Searchlet doesn't work on my site?

Dave, you can restore my sanity. I'm trying to get the Technorati searchlet to work on my Web site and the darn thing just isn't working out right. I've even blogged about it to no avail. Help!

HTML and CSS

How can I hide an HTML form's email address?

I really enjoyed your article about the "mail to" problem many of us rely on for folks to contact us for one reason or another.

While I am just a geekette wanna-be, and am at best a stumbling dabbler in script and coding, I was wondering if you could share greater detail about how you scripted your contact form? When I took a look at the source code, not that I understand a lot of it, I was unable to determine how the message gets to where it needs to go without specifying the destination in the HTML?

CGI Scripts and Web Site Programming

Can I change my Web page based on time of day?

Dave, I need your help. I'm updating my Web site for The David Lawrence Show and would like to display 'ON THE AIR' between 7p and 10p PT (3a to 6a GMT) Monday through Saturday, and 'OFF THE AIR' the rest of the time. How do I do this? Later, I can easily replace this displayed text with an image tag once I find an on-air light graphic that doesn't look like it's from 1943. :-)

CGI Scripts and Web Site Programming

Can I selectively block people from visiting my Web site?

Dave, we've got a problem. I help run a Web site and we're finding that there's one troll out there (yes, I read your article on trolls a few days ago!) who keeps showing up and posting inflammatory comments, really ruining the guest book for everyone else. Is there a way to selective block one person without just tossing the whole guestbook out?

CGI Scripts and Web Site Programming

How do I create a JavaScript countdown timer on my Web page?

Dave, being a new web developer I would like to know how I can code for a numeric value to decrease by 1 every 24 hours based on the local time function.

Specifically, we are trying to create a reminder for our employees of an upcoming DoD audit in the facility. The count down will represent the number of days remaining before it's conducted. So what I need to do is begin with a date and start the countdown from there. What is the code that I should use?

CGI Scripts and Web Site Programming

How do I automatically print the results of an HTML FORM?

Dave, I remember reading your book Creating Cool Web HTML 4 Web Pages and seeing a sample about a sub shop where online customers could order sandwiches...

Can you help me find a script that will take FORM information and upon submit, send it directly to a network printer? This is for a local courier service I am building a site for and I would like to offer them real time, print outs of web based delivery orders.

CGI Scripts and Web Site Programming

Does Paypal have a merchant referral program?

Dave, I've been happily using Paypal as a merchant account and shopping system for years now, and would like to turn on a few of my colleagues to this fast and simple system. If possible, I'd like to get some sort of commission or referral bonus. Does Paypal offer such a thing?

CGI Scripts and Web Site Programming

How do I sum up answers on an HTML Web-based form?

Dave, I just want to add numbers together, get an answer, and retrieve a document represented by the answer. I have 11 pages for people to answer "yes" or "no" on. I have my "yes" and "no" buttons working properly. What I need to do is assign numerical values to each button on each page. Then I need to add the values of all 11 pages of each button pushed to get one answer. I want to use this answer to retrieve one document to be displayed for the viewer. Maybe you know of some tricks that can be used in HTML to do this. I was thinking if I can't do it in HTML, maybe javascript might be an answer.

CGI Scripts and Web Site Programming

How can I add a Google search box to my Web site?

Dave, I keep visiting sites and seeing these cool search boxes that let you either search their entire site or search the entire Google database, all without leaving that page! I want to have something like this and would appreciate your helping me figure out the code needed.

HTML and CSS

How can I use Javascript and CSS to display the date?

I received this email from a younger reader: "Dave, thanks for your cool book Cool Web Sites, but I still need a bit of help. I want to have a little box on my page that shows the person the current date, like you'd see on a day-a-page calendar. I figure you can do that in CSS and Javascript, but I can't figure it out. Can ya help me?"

CGI Scripts and Web Site Programming

Why would I bother with a Weblog or Blog when I could just build a regular Web site?

My sister and I have been engaged in a dialog about the merits of weblogs versus traditional Web sites and it's evolved into a quite interesting discussion. She asks: "I still don't see how a blog would be better for me than a web site. I don't see why a person would want to come to my site often to see what I'm up to."

CGI Scripts and Web Site Programming

How do I add new "ping" sites to a Movable Type Blog?

A pal of mine who is a prolific writer but not so much of a techie asked me the following question: "I've just heard that feedster added a feature where I can automatically ping them when I have new entries for my Weblog. I use Movable Type daily, but I'm darned if I know how to add a new ping host to my blog configuration. Help!"

CGI Scripts and Web Site Programming

How can I delete Movable Type (MT) blog comment spam easily?

A technical wizard pal of mine asks: "I have all sorts of challenge/response barriers to comment spam on my Movable Type weblog, but occasionally someone goes through the work of identifying themselves and still leaves some silly spam comment. I want to delete it, but right now I get the email notification of the new comment, then have to log in to the administrative interface, find the comment, and delete it by hand. Quite a hassle. Isn't there a better solution to this?"

CGI Scripts and Web Site Programming

Can I bulk fix PHP require/include references?

A pal of mine asks: "Ugh.. I'm facing server-move Hades.. am moving my site dadsrights.org to a hosted solution, and I have dozens and dozens of files with PHP require_once() includes like "/www/dadsrights/XX". They all need to be changed to "/nfs/www/dadsrights.org/XX". Help!!"

CGI Scripts and Web Site Programming

How do I map XX.com to www.XX.com in Apache?

I've been keeping an eye on a very interesting discussion about the difference between the Google pagerank of pages on a "www" domain name and the same page without the "www" prefix (e.g. "www.intuitive.com/index.html" versus "intuitive.com/index.html"). Google calculates pagerank based on quite a few different criteria - as detailed in my article How does Google figure out what pages are more relevant? Pagerank. - and if you care about that, and you should, you should be automatically mapping all non-www URLs to their www equivalent.

And here's how to do just that...

CGI Scripts and Web Site Programming

How to use Apache htaccess to password protect a directory

In a rather lengthy email message, a reader writes to me that:
I am following your book Creating Cool Web Sites with HTML, XHTML and CSS and am trying to protect a subdirectory on my website. The following is the .htaccess code
AuthUserFile /www.bvg.us/uswholesale/uspasswords/passwords.txt
AuthGroupFile /dev/null
AuthName "Please enter your login name and password"
AuthType Basic

<Limit GET>
require user weiyang
require user annawei
</Limit>
The "passwords.txt" reads
user weiyang:wy
user annawei:aw
By doing so, I can get the "log in" box but can not login with the info that I set. Could you help me on this?