Wednesday, May 27, 2009

Simple Find and Replace PHP Script

PHP Quick Find Replace Script

I was working on a client who had an older website with about 100 pages and they were all “full html.” By full html I mean the entire layout was stored in every html file, so any change to the layout required a lot of time. So I created a quick and dirty script to load into the directory I was working in, it pulls all files with the defined extension then finds and replaces one string for another.

This script is very easy to setup and run.

Instructions:

a. $ext = “php” – Set this to whatever extension you wish to edit. Currently it is only setup to do one extension at a time. I usually run it on php and then the html files, then css if urls needs to be changed.

b. $current = “123456” – Set this to whatever your pages currently say. This is what you want to replace/get rid of.

c. $new = “ABCD” – Set this to whatever is to replace $current.

d. An example of replacing info@warnerdata.com to support@warnerdata.com would be:

$ext = “html”
$current = “info@warnerdata.com
$new = “support@warnerdata.com

  • 4. Upload your edited replace.php to whatever directory contains the files you wish to edit
  • 5. Point your browser to: http://yoursite.com/directory/replace.php
  • 6. Repeat for any other extension
  • 7. Delete replace.php

Things that could be added later:

GUI interface with password protection
Do more than one directory at a time
Do more than one file extension at a time
Create backup of files to be edited with an undo button

Hope this helps!

Salt Lake City Web Design

Friday, May 22, 2009

Not enough traffic? Here are some simple tips to advertise for free

Web Forums
Web forums have been around a long time. If you don’t know what a web forum is, it’s just a place with where people go and post their thoughts or opinions on certain niches. There are car forums, gardening, dog, SEO…. Whatever your business sells or does there’s a forum dedicated to it. Start posting in these forums, don’t write sales letters as posts right off the bat. Become a part of the community and slowly start selling people on your product. On most forums you can even add your link to your signature. You get free advertising and a free link back to your site.

Articles
Articles are the foundation to any good traffic campaign for your website. Typically I suggest to my clients to take a few hours every Monday to type up 3-4 articles to post throughout the week. Add the articles to your blog and also to sites like ArticleBase.com and EzineArticles.com. Again more links to your site and free advertising. Be careful sometimes these sites can rank above you on your search terms.

Social Networks
Join any of the ever growing social networks. Find your friends, colleagues and some complete strangers. My networks are pretty large and usually I can post a link and get 50-100 visitors from it.

Offline Marketing
A lot of people tend to forget about the offline world when they get involved with their online businesses. Make sure to advertising where ever you can offline. Add your URL to your business cards, brochures and handouts. I like leaving my card everywhere; you never know who might need a website.

Search Engine Optimization
The best part of all the above free advertising (minus the offline) is these help build your ranking with the major search engines. The more links you get, the more content you have, the more Google will like your site and move you up in the search results. And what is better than being ranked #1-3 in Google? Talk about free advertising!

Thursday, May 21, 2009

Ranking in Google Local Search

Dominating Google’s Local Search
First off, for those who don’t know what Local Search is lets explain it. Local Search allows users to find products or services in their defined geographical area. You’ve probably seen in on Google before if you’ve searched for anything in your town, for example “Salt Lake City Dog Walkers” shows a map of about 10 true local listings. It also has the normal advertising listings and organic search below the local search.
First thing to start ranking on Local Search make sure all of your business data is correct. Visit: https://www.google.com/local/add/ to add or edit your business listing.
After that here are my suggestions for your profile:
• Make sure to use your business name in the name section, this is what people see but I have yet to see any major change in keyword loading the company name.
• Load your description with your keywords
• Add photos like your logo, business building, and products, anything you can. The more content you have the more Google seems to like this.
• Have your customers write real reviews of your product. You can then take those reviews and copy them to your website or whatever you may need those for.
• Create a couple coupons. They probably won’t ever be used but Google seems to like them.
I added my business to local search a few months ago and I was getting a lot of business from it. The main keywords for Web Design are pretty tough to crack. But through local search I’m able to “out rank” these long time businesses and web directories. At first I was ranking really well and then suddenly I disappeared off the listings and my business also disappeared--which is a good point to not rely on one source of traffic!
I went in and added a bunch of examples of websites we’ve done, along with adding a few coupons and having a couple reviews written for the company. As of now we are ranking again but now in the top 1-3 spots for local listings.
I’ll keep you updated on what I do to keep my ranking in local search.