Search Engine Rank Checker for Google and Yahoo!

A few months ago we began offering SEO services to some of our clients that were looking to ramp up some traffic and revenue by increasing relevant traffic to their e-commerce sites. One of the services that we offer  as a result of SEO is monthly or bi-monthly reporting to customers for them to track how well their site is doing in some of the major search engines used today. This was a very manual process for me during the initial offering of this service, primarily due to the fact that most “rank checkers” are a minimal fee per month or they are complete garbage. After a week of copying and pasting stuff from the web into a spreadsheet, I finally came across a great free tool developed by Aaron Wall from http://www.seobook.com. This tool allowed me to look up multiple keywords and/or domains with the click of a button after I created all of my presets for my keyphrases. The one thing I like to do is report back to my clients is how many total terms were returned for the particular keyphrase they were wanting to get indexed. (or were indexed on for that matter) In a thread on the seobook.com’s site I asked about possibly adding this small enhancement to the tool, but was told they were trying to keep features to a minimum because of enhancement requests, which I definitely understand. (especially when you write these tools for free) This denied request was only a small setback and was enough motivation for me to create my own tool written in PHP of course, for this sole purpose.

I was able to develop this tool in just a short period of time, but I did it so quickly that I decided I wasn’t just going to stop here. Why not try to write my own rank checker? Yes, I already have one that works fine, but I am still having to copy and paste things into my client reports, which was the whole reason I wrote my initial script in the first place. After a day of figuring out the best way to design this tool, I decided to basically just write a tool that parsed results from search engines instead of using an API. (plus I couldn’t find an API anyways) The tool is nothing complex and not more than probably 50 lines of code that queries Google and Yahoo for specific user-defined terms based on a specific domain or URL.

I would love to share this tool with anyone that feels like it would help them out in either reporting to clients, tracking their own keyphrases or anything else you feel it would be applicable for. I will be continually adding new features to it and will be glad to receive enhancement requests from anyone that has a good idea or suggestion. The tool can be found at http://www.dsofky.com/rank_check.php

Password protecting individual files or child directories of a parent

I learned a nice little trick today in the process of trying to accomplish what I thought would be a thoughtless task. An instructor at my day time job asked me to give him access to a directory so he could view it on the web, but to not let anyone else have access to.

I told him about the scp command and recommended an scp client to him for uploading files to our media server. As far as allowing him to view the files in the media share, I figured I’d just set up a web accessible directory and .htaccess protect it. After creating my .htaccess and password file and making the necessary config changes to my httpd.conf, I restarted apache and voila, I was done! Until I realized that .htaccess works from the top down, so not only was the media share directory password protected, so were all of the media files in the share. I started searching around and after and few minutes came up with this:

<Files *.wmv>
Satisfy any
Allow from nopasswd
</Files>

I created a .htaccess file with this and placed it in my /home/media/Videos. Now my .htaccess files allow me to .htaccess protect both /home/media and /home/media/Videos, but allows access for all .wmv files in /home/media/Videos to stream out. If you want to allow access to other files types, simply add them to the <Files> tag delimited by commas.

VMWare Server 2.0 running Leopard OS X on Dell XPS M1330 continued…

Well it’s now Tuesday the 12th and I still haven’t had any luck getting Leopard to run as VM within VMWare Server 2.0. I decided last night to try my luck with Sun’s xVM Virtual Box. I have to say I like it as well as VMWare if not better so far, but I don’t want to jump the gun yet. Here are a few highpoints I’ve noticed in comparing the two:

- Windows XP Pro runs faster, more fluid and uses less memory
- File and Directory sharing between the host and guest OS

I am only having 2 problems right now with Virtual Box. First off, none of my USB devices are working. Secondly, my screen is about half the size of my entire monitor size, so everything isn’t proportional and trying to add the “Guest Additions” isn’t doing anything. After a little Googling, I came across a thread in regards to “Installing Guest Additions” for Virtual Box and how sometimes nothing happened when you click on the option. Apparently this has something to do with it trying to mount the ISO in the CD/DVD ROM because after I unmounted the CD/DVD ROM and went to install the Guest Additions again, it worked fine and I now how native resolutions on my XPS M1330 in Virtual Box. The next issue was getting the USB 2.0 working in my Guest OS. I ran across quite a few threads that suggested me making changes to my fstab or /etc/init.d/mountdevusbfs.sh files, but I tried both suggestions and neither solved my problem. After more research, I finally came across this article which gave me a working solution. First uncomment the following lines in /etc/init.d/mountdevusbfs.sh:

# Magic to make /proc/bus/usb work
#
#mkdir -p /dev/bus/usb/.usbfs
#domount usbfs “” /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644
#ln -s .usbfs/devices /dev/bus/usb/devices
#mount –rbind /dev/bus/usb /proc/bus/usb

Now let’s edit /etc/fstab and add this below all entires in that file:

none /proc/bus/usb usbfs devgid=124,devmode=664 0 0

Make sure that the bold number matches the number of your vboxusers group in /etc/group so that user has permission to mount usb devices.

Now the last thing we need to do is edit /etc/init.d/mountkernfs.sh and add the following lines. Make sure you paste the line below above the line:

"# Mount spufs, if Cell Broadband processor is detected"

## Mount the usbfs for use with Virtual Box
domount usbfs usbdevfs /proc/bus/usb -onoexec,nosuid,nodev,devgid=124,devmode=664

After pasting the this line, restart your machine and your USB devices will now mount in Virtual Box!

The next problem I had with with directory (folder) sharing between the guest and the host. I made a share but for some reason my Guest OS (Windows XP) wasn’t seeing it. Apparently this is somewhat of a known issue and all I needed to do to resolve it was to reinstall the Guest Additions. After rebooting both of my shares were now fully accessible from the Guest OS.

I will attempt later today or tonight to get OSX Leopard running in Virtual Box and report back as to whether I have any luck or not…

VMWare Server 2.0 running Leopard OS X on Dell XPS M1330

So today I decided I wanted to try installing a Leopard OSX VM on my Dell XPS M1330. I first heard about the osx86 project a few years ago, but had never really made any time to actually sit down and try it out, so here goes nothing…

I began by downloading an OSX 10.5.2 .iso image from mininova.org. Once I had my image, I burned it to a disc as an image file. After creating a new VM within the Web Access interface as an  “Other” 32-bit Operating System and selecting all my other options, I was ready to go. I inserted my OSX .iso into my DVD drive and fired up my new VM, unfortunately nothing happened and I got an error:

Ebios Read Error : Device Timeout.
Block ******* sectors 64

I Googled this and found a few people that had run across this same problem but there didn’t really seem to be a good fix that I came across other than buring the disc at a slower rate, so I decided to try that first. After inserting my newly burned disc, I once again fired up my VM I head created earlier and attempted to boot from the disc. I actually got to a screen now that had some info on it!

Unfortunately no matter what key combination I pressed, I couldn’t get passed this screen. Any time I did anything, I would see an error pop up “system config file ‘/com.Apple.boot.plistnot found”. After I did some more research on Google to figure out what was going on, I ran across this article. After still having the same after some time,  I started reading some more. Apparently part of the problem is that the installer cannot even find my hard drive, which would explain why it’s trying to boot from PXE. I reconfigured my VM once again, but this time I chose IDE as my hard drive type instead os SCSI and I was actually able to boot from the menu. Now I have reached a problem where once it begins “Jettisoning the kernal linker”, my VM totally freezes up or starts bombing out with errors. Be back with more shortly…

Recent Problem on CentOS with automount, Avahi-daemon and HAL (haldaemon) failing on boot

This morning I came into work to learn that none of my users were able to connect to our file server. I started investigating the problem on the file server itself and the first thing I noticed was the when I ssh’d into the machine, it took about 2 minutes to drop me to a bash prompt. I checked the loads on the machine and nothing looked out of the ordinary, so I started looking at log files. I didn’t see anything out of the ordinary in /var/log/message or in /var/log/dmesg, so I decided that once I was finally at a prompt to restart the machine, I would. When the machine came back up, udev was initially the first service to fail on boot, then automount, Avahi and HAL all failed to start also. I wasn’t sure what to do and in my previous life as a Windows system admin, I decided I would take the Windows preferred solution and reboot. (again) After rebooting udev started successfully, unfortunately everything else was still failing, so now I needed to start digging in to where the problem was.  Since automount was failing first, I figured I start with it since it was possible the other services were somehow dependent upon automount, so I grep’d my logs:

[root@nas ~]# grep automount /var/log/*
/var/log/messages:Aug  6 09:24:56 nas automount[2160]: lookup_nss_read_master: can’t to read name service switch config.
/var/log/messages:Aug  6 09:24:56 nas automount[2160]: master_read_master: can’t read master map auto.master

The first place I decided to look was my /etc/nsswitch.conf, but everything looked okay there, so I began checking Google to see if anyone else had come across the same problem. I came across this post and after reading it, decided to check my /etc/sysconfig/autofs config file and lo and behold mine had the following in it:

DEFAULT_MASTER_MAP_NAME=”auto.master”

I don’t understand how it’s worked successfully for nearly a year without a hitch and then all of the sudden a file gets a particular line commented out in it, but the certainly seemed to be the case. I don’t remember running yum update anytime recently so I’m baffled as to how this happened, but I still have services that won’t start and employees needing to access their files, so I will deal with this later. After updating my /etc/sysconfig/autofs to:

DEFAULT_MASTER_MAP_NAME=”/etc/auto.master”

I restarted autofs and it started fine, so one problem down, 2 to go.

The next failing service I had was the Avahi-daemon, so again I grep’d my logs to see if I could find anything:

[root@nas ~]# grep avahi /var/log/messages*
/var/log/messages:Aug  6 09:23:24 nas avahi-daemon[2377]: Leaving mDNS multicast group on interface eth0.IPv6 with address fe80::216:76ff:fecf:b32f.
/var/log/messages:Aug  6 09:23:24 nas avahi-daemon[2377]: Leaving mDNS multicast group on interface eth0.IPv4 with address 10.200.1.15.
/var/log/messages:Aug  6 09:24:59 nas avahi-daemon[2355]: Found user ‘avahi’ (UID 70) and group ‘avahi’ (GID 70).

Nothing looks problematic here, so I just went ahead and disabled Avahi for now and moved on to the haldaemon (HAL) and hoped Avahi and HAL worked together and that was my problem. I grep’d my logs one more time, but the only thing I saw was from the anaconda updater, so it was really starting to make me wonder why these services were failing if they weren’t returning any failed status codes or error messages.

My hopes were quickly dwindling and my stress level was increasing. The last thing I decided to try was yum update. There were a considerable number of packages that needed to be updated, so I let it run for a few minutes until all packages had been updated. After the updates were installed, I decided to reboot and cross my fingers.

In the process of sitting there waiting, I decided I would check a few of my other servers connected to this KVM so for good measure. I went to log in to the first domain controller (Windows Updates ran last night) and much to my surprise, I wasn’t able to log in. I do have fat fingers, so I typed it again…still a failed attempt. WTF is going on I thought to myself. (I probably even said it outloud too) I switched to our other domain controller, attempted to log in and sure enough, I got right in. So now I have more than just a file server that won’t serve files, I now have a DC that I can’t even log in to which also happens to be our Global Catalog and holds all roles FSMO roles, so it’s important I figure out what’s going on with it too.

Since I wasn’t able to log on and I am the only Domain Admin and local log in isn’t available, I had no other choice than to hard reboot the machine. My fingers were crossed that rebooting this machine would fix my problem of not being able to log in, but my hope was only based only on the fact it was a Windows machine and a frequent reboot seemed to be the most reliable solution for Windows OS related problems. When the machine finally came back up, I attemtped to log in and voila, it let me right in. Now this got me thinking….Since the machine I was initally having problems with is a file server that I am running SMB and Winbind to integrate into our Active Directory, maybe the fact that it was trying to communicate with my primary DC was causing my problems this whole time, so I decided to one last time reboot my file server. When it came  up from boot, sure enough, no failed services whatsoever and I was able to successfully mount my smbfs shares.