Checking HTML Source Code How To

Last week, after I shared why I check my source code daily, Stephanie Trahd asked me how I do it and suggested a follow up post. This is for you Stephanie – and anyone who really wants to know of course 😉

It is amazingly simple, you won’t even believe it BUT this method requires CURL which must be installed on your web server. Which means… if your web host does not have CURL installed, it won’t work. You don’t have to know what CURL is or exactly how it works. But you have must know, simply put, CURL is a web content fetcher. You tell it which web site to go fetch and what to fetch and it’ll obediently fetch it.

The other thing your web server requires is the ability to run CRON oh Lord another techno term. Don’t be intimidated by the term CRON is a program that will automatically execute commands at dates and intervals you tell it to. Do you know how in Windows you have something called Windows Scheduler? Say you want to run a program a 12noon every day and you program it to do so? Ah! That’s what CRON does.

Put CRON and CURL together and you get a report of your HTML source code in your email every day. Here’s the code to use. The following are instructions using cPanel.

After verifying your web host can run both, log in to your web host cPanel. Click Cron jobs.

Click Standard

Enter your email address at the top and then the following code that will fetch your page in the 2nd box.

curl --user-agent "Googlebot/2.1 (+http://www.googlebot.com/bot.html)" http://www.yourwebsite.com

Select the time and day for CURL to go fetch your page.

As you see above, I have 0 minutes, 0 hours, every day, every month and in weekdays, I selected every single day of the week. This means it’ll run every day at midnight, every single day of the month and every day of the week. If you want to check only once a month, you need to select the date under Days and every day of the week for Weekdays. If you want to check only week days, you can leave everything as I have selected above except Weekdsays, select Every Weekday. You can also change the time to whatever suits you.

When you’re done, just click Save Crontab and you’re all set.

Oh yes, just in case you didn’t know the times here are server time not your time zone so you may find that you’ve chosen 12 midnight but it comes a few hours earlier or later. That’s because you and your server are on different time zones. All you need to do is delete the cron job, re-do the above steps and set the correct hours.

P/S: These things are pretty standard on web hosts generally but occassionally, I do run into hosts who over barer than bare bones features. If your host does not support any of the above maybe it is time for a new host. I suggest ReliableWebs.

Do You Want A Hands-Free Business?

Then get this guide to help you systemize your business so you'll have more time working on your business.

!
!

Hey! I want to make sure you know what you're getting here. In addition to the guide, you will also receive our memo that includes special offers, announcements and of course actionable information.

Terms and Conditions checkbox is required.
Something went wrong. Please check your entries and try again.
Facebook Comments

4 Comments

  1. Tom's Orchid Flowers Help on December 15, 2008 at 5:14 pm

    Lynette,
    excellent post.
    Have to go and check with my techie what is available



  2. Lynette on December 15, 2008 at 6:27 pm

    Hey Tom, here’s to hoping you can run it. Warning: It can be overwhelming when you have a lot of web sites to monitor – but the solution to that is simple of course 😉



  3. Stephanie Trahd on December 16, 2008 at 12:10 am

    Thanks Lynette! I use HostGator and think I have what’s necessary. I’ll try it out tomorrow. And thanks for the mention 😉



  4. Marya on May 17, 2009 at 2:54 pm

    Thanks, Lynette! I’ve set this up.

    What a great security tip.