EPN Niche Site 5: Special Characters

I was really getting sick of having to keep updating my code to accept different special characters. I was doing a simple php str_replace to take a special character and turn it into a space or just remove it. I did a little more digging and decided to use this line of php code:

$string = preg_replace(‘/[^a-zA-Z0-9_ -]/s’, ”, $string);

This takes my title and removes everything except a-z, A-Z, 0-9, _, -, or a space. It simply removes all special characters from the string… in this case my title. I let the wordpress title keep the special characters but just don’t pass them on when doing my keyword and API calls.

So that should be the end of most of my special character errors. I pushed the updated code out to all my new sites using the batch file I wrote about in the previous post. I am loving that!

Our 5th EPN niche site is Good Digital Cameras. This is a new domain registration. One thing I love about this site is that I can come up with almost limitless titles for the keyword Digital Cameras. Many of which include specific model numbers and brands. This is great for those long-tail search engine results that I am looking for. I think I will be doing more sites like this soon… that have model numbers and brands in the titles.

About Joe

An active Internet Marketer that likes hanging out in the Warrior Forum on his spare time. My favorite ways to earn money at the moment are software products, eBay Partner Network and Google Adsense. Got a question for me? Just ask!