Press "Enter" to skip to content

Posts published in “Webmaster / SEO”

Tired of DMOZ’s description?

If your web site is listed in the Open Directory Project (ODP, then Google and MSN will often use the text that the ODP uses to describe your web site in their own search results.

Unfortunately, the descriptions in the Open Directory Project are often outdated and they don’t reflect the current status of a web site. That means that your web site might be listed with an outdated description in the search results on Google and MSN.

How to get rid of the ODP description

To tell Google and MSN not to use the ODP description for your web site. You can direct Google and MSN not to use the ODP as a source by adding a new Meta tag to your web pages.

To prevent all search engines (that support the Meta tag) from using the ODP description for the page’s description, use the following HTML tag:


To specifically prevent Google from using this information for a page’s description, use


or just prevent MSN from using the description, use

<meta NAME="msnbot" CONTENT="NOODP"></meta>

Once you add this Meta tag to your pages, it may take some time until a new description of your web page will appear in the search results of Google and MSN, depending on how often your site is spidered.

Yahoo does not support the NOODP tag, since they operate their own directory they do not need to pull the web page descriptions from the ODP.

DHTML expandable lists

How to create a DHTML expandable lists.

Try the following example:

.general {font-family:Verdana;font-size:11;color:white} .span_general {font-family:Verdana;font-size:9;color:white;border-style:solid;border-color:white;border-width:1px 1px 1px 1px;text-align:center;width:16;height:15;cursor:hand}

function objectOver(x){"#9ff5ff"; }

function objectOut(x){"white"; }

function collapse(x){ var oTemp=eval("document.all.text_"+x); var oClick=eval("document.all.click_"+x);

if("block"){"none"; oClick.innerHTML="+"; } else{"block"; oClick.innerHTML="-"; } }

Text 1 TITLE

text that is displayed under Text 1 TITLE
another line of text here
Text 1_1 TITLE

Text under Text 1_1 TITLE catagory
Text 1_2 TITLE

This is a test of the emergency broadcasting system.
Text 1_2_1 TITLE

If there were a real emergency and you thought someone would care this
information would be classified and you wouldn't know anyhows
Text 1_3 TITLE

Example for 1_3 text area...
Notice in the code that the breaks all have a trailing slash....thus closing the br tag
I'm trying to remember to use correct syntax before something breaks it.

php case change

This is available for PHP 3, PHP 4, & PHP 5.

strtoupper — Make a string uppercase

string strtoupper ( string )

Returns string with all alphabetic characters converted to uppercase.

Note that ‘alphabetic’ is determined by the current locale. For instance, in the default “C” locale characters such as umlaut-a (ä) will not be converted.

Example 1. strtoupper() example
<?php $string = "This is a test of the Emergency Broadcasting system..."; $string = strtoupper($string); echo $string; // echos - THIS IS A TEST OF THE EMERGENCY BROADCASTING SYSTEM... [/code] Note: This function is binary-safe.

Protect your web pages – automagically with perl

After a recent incident of some piss poor script kiddie defacing one of of my websites I wote a quick and dirty little perl script to both monitor and repair things should it happen again. (thus giving me much more narrow window of server logs to check to find the exploit or whatever allowed it to happen in the first place).

Here’s how it works in a nutshell, the site’s content is completely dynamic, however the php script to generate it is static..

  • $file1 is the working page
  • $file2 is the name of the known good page
  • generate a checksum of the two files, the output will be a string of numbers followed by a character count and the filename checked.
  • compare the first 10 digits of the checksum of the returned string (adjust to suit your needs)
  • if they are different run ‘page’ (sends an email to my cell/pager) and ‘repair’ (renames the bad file appending the date/time then copies the known good file to replace the defaced one)
  • otherwise exit
  • Pretty simple, and I’m certain my code could be optimized to run a lot cleaner (if you want to submit a cleaner version by all means post it in the comments!) In the interim this works.
    ###Dave Cochran
    $file1 = “index.php”;
    $file2 = “index.good”;
    $diff1=`cksum $file1`;
    $diff2=`cksum $file2`;
    $diff1value = substr($diff1, 0, 9);
    $diff2value = substr($diff2, 0, 9);
    if ($diff1value != $diff2value)
    #print “no difference in file checksums.”;
    #uncomment the line above for testing

    sub page
    # sendmail routine source from
    use Time::localtime;
    open (OUT,”|/usr/sbin/sendmail -t”);
    print OUT “From: you@yourdomain.comn”;
    #remember to escape the @
    print(OUT “Date: “.ctime().”n”);
    print(OUT “To: email@youremailorpager.comn”);
    #remember to escape the @
    print(OUT “Subject: Index.php changed!n”);
    print(OUT “n”);
    print(OUT “index.php has been changed!n”);
    } # end sub page

    sub repair
    use Time::localtime;
    use File::Copy;
    rename($file1, $file1.ctime()) || die “Cannot rename file.txt: $!”;
    copy($file2, $file1) or die “File cannot be copied.”;
    } # end sub repair

    This will require two perl modules Time::localtime and File::Copy which are generally installed with the perl bundle by default, if not get them from CPAN or contact your host.

    Simply run the script I called via cron or whatever means you wish as often as you want to check the page. Personally every 5 mins works out pretty good for me.

    Feel free to use the code above as you will, modify it to suit your needs, be it to protect your web pages, files, or whatever. If you find it useful, please send $$$, or just a thanks.

    A great Vbulletin resource

    While surfing around I found yet another great resource for vBulletin, great folks with lots of good ideas, and a lot of expertise.

    Take a look at Tell’m dakar referred you 🙂

    50% off on web hosting!

    Thanks to a brand new deal by my current web host I’ve been afforded the opportunity to setup a special promotional offer for folks looking for a new host, or looking for their first host.

    Here are some of the details of the plan $7.95 a month gets you;
    1 FREE domain registration (with free renewals)
    unlimited full domains, unlimited subdomains
    custom DNS
    16G Disk space (completely unheard of!)
    120 GB Transfer
    600 Mailboxes
    75 Shell/FTP Users
    Unlimited MySQL databases
    SSH shell
    Ruby on Rails
    Fontpage extensions (if you want them)
    One click auto install of many applications like phpBB, WordPress, and so much more.

    Now the sweetest part of the whole deal, sign up for a year and all setup fees are waived, then use my special promotional code CAPTIVEREEFING, and you will get a 50% discount for the year! Discount will appear after entering the promo code. Works out to about $50 for your first full year including a free domain registration!

    Take a look around and compare, if you can find a better deal please let me know (I may move too!), But these folks have been excellent to work with and in the first year I’ve ZERO downtime of any of my sites!

    Check them out (and don’t forget to use the promotional code mentioned above)

    Tell your friends!

    phpBB upgrade patch to v2.0.17

    phpBB released new version 2.0.17 this afternoon;

    This release addresses several bugfixes and some low security issues as well as the recently seemingly wide-spread XSS issue (only affecting Internet Explorer).

    Patch files and documention available from phpbb’s website


    All the cool enhancements that were made all week to my main Forums had to be backed off and re-applied after finding out that I broke the main language file and subsequently breaking the registration page… Just glad I make frequent backups. Too many I think, there are backups of files that are over 6 months old and dozens of versions behind.

    One of these days I’ll remember that PICO has a finite limit on line lengths and truncates ‘long lines’ for you, not that you want this to happen. What a mess. Hopefully someone else will remember this next time they are hacking on their phpBB files…. pull them into something like gEdit to make your mods. Need to see if EMACS or another CLI type editor avoids the same annoying ‘feature’ of truncating long lines. Seems silly to have to jump into Xwindows just edit a PHP file.

    While I was at it I did shorten the initial registration page for the forums down to 4 entries, username, email addy, and password/password verification. Folks can go back into their profile and update the rest of the info as they see fit. Just speeds up the registration process a bit, 4 fields is less daunting than the 30ish editable fields. :sigh:

    Google sued over ‘click fraud’ in Web ads

    This should prove some interesting results…. I guess each new ‘technology’ out there today is going to go through some legal validation process to ensure people aren’t getting ripped off, click fraud has been pretty tightly controlled by Google in their AdSense program. I’ve heard time and again how people’s AS accounts were just disabled (thus any revenue generated was in forfeit).

    SAN FRANCISCO (Reuters) – A seller of online marketing tools said on Wednesday it sued Google Inc., charging that the Web search giant has failed to protect users of its advertising program from “click fraud,” costing them at least $5 million.
    click here

    Click Defense Inc. filed its lawsuit, which also seeks class action status, on June 24 in U.S. District Court in San Jose, California.

    Click fraud is not “fraud” as defined under the law. Rather, it is an industry term used to describe the deliberate clicking on Web search ads by users with no plans to do business with the advertiser. Rival companies might employ people or machines to do this because the advertiser has to pay the Web search provider for each click.

    phpBB upgrade patch to v2.0.16

    version 2.0.16 was released earlier today. pretty clean install… a couple of bugfixes and one security patch.

    Official announcement is here