Skip to main content

Posts

Showing posts from January, 2010

PHP email Class

I was looking for a PHP SMTP email class and stumbled across this PHP email class by Manuel Lemos. PHPclasses.org is rapidly becoming my first port of call when I'm looking for a class to fill some general function in my code. Of all the scripting sites out there, and there are hundreds, this is possibly one of the few that I would recommend to people. One of the reasons that I liked the script was the debugging feature that showed the server responses as they happened. I've been busy setting up firewalls, SMTP relays, and IIS (hate hate hate) so it was useful to be able to get debug info from my client software. In any case the class worked flawlessly first time, it's free to use, and my client is happy.

Squid proxy server

My job title is "PHP developer" but because I'm the only person in the office familiar with Linux I get roped into administering the LAMP stack and other systems roles. Yesterday I was asked to investigate methods of monitoring individual bandwidth use. I've installed Squid proxy server so that all traffic is getting routed through my pet Linux box that I keep spare just for such occasions. Right, now I'm asked to install software to filter out sites not related to work (like OkCupid... uhoh). So I find a program that slots into Squid and install it. Bang! Facebook and all other sites mysteriously get replaced with a kitten (from icanhazcheeseburger.com) chewing network cables captioned as "Ohnoes!!!1 kitty is eating my megahurtz!". Putting me in charge results in silliness. I hope they do it less often. Anyway, despite my best efforts to make the access denied picture cute and adorable my users still hate me. It's tough being a webslave. A li

Prevent XSS attacks

XSS (Cross Site Scripting) is a surprisingly easy weakness to exploit on unprepared websites. To describe it at its highest level an XSS attack involves injecting code into a webpage and having a user execute it on the grounds that they trust the website you have hijacked. There are a great many vectors for an XSS attack to come through, but for the most part applying a few simple safety precautions will greatly improve your site security. XSS attacks can be split into one of three categories: Stored XSS attacks - are those where the attacker stores malicious code in your database, forum, comment section or elsewhere on your site. The victim receives the code when they request that particular content from your website. Reflected XSS attacks - are those where the malicious code is reflected off the server and sent to the victim as part of search results, emails, error messages, etc. This can be set up by tricking the victim into clicking a specially crafted link (or filli

Google Guideline - How spiders view your site

In its "Guidelines for Webmasters" document Google notes that " search engine spiders see your site much as Lynx would ". A web spider is a program that searches through the internet for content ( see here for more definitions .) Lynx is a web browser that was used in the good old days of internet before we had fancy things like mouses, graphics, or sliced bread. Put very simply Lynx is a bareboned web browser that supports a minimal set of features. You can download a free copy from this website . There are other uses for Lynx other than SEO (such as pinging a webpage in a crontab), but for SEO it is mainly used for usability and visibility testing. If you don't feel like installing new software there are a number of online spider emulators that will try to show you how a spider views your website. One that I found is available here . Now that we have the means to see how Google spiders view our website we can have a look at what implications the

Getting Google to notice you

Keep it simple I've read so many articles by SEO experts outlining how to get a high position on search engines. After ranking a website at number 1, and keeping it there for well over a year now I can offer some solid advice. The truth is that getting a good, sustainable ranking is a relatively simple affair. However, SEO experts want to make it sound as complicated as possible. How else will they be able to charge you their consultancy fee? Before you continue reading my blog read this link: Google Guidelines for Webmasters . If you adhere to those guidelines you will get ranked. Stating the bleeding obvious Question: How does Google make money? Answer: Primarily by selling advertising. Question: How does Google make money from advertising? Answer: By getting lots of people to look at it and click through to their clients Question: How does Google get lots of people to look at their adverts? Answer: By have a good service that they want to use (the search engine) Question: How

5 practical ways to reduce spam

Internet "spam" is a term coined to describe unsolicited emails that companies and individuals send out en masse. Because it is very cheap to send an email spammers will send millions of emails out. Even if just one or two people purchase their product the spammer will still make a profit. Spam ranges from being simply annoying to being an outright scam or even dangerous. Consider as an example the ability to purchase medication without needing to see a doctor or obtain a prescription. Spammers send this information out to children. Spam messages eat up a large amount of internet bandwidth which leads to service degradation for legitimate users. It has become such a problem worldwide that many countries are adopting legislation to combat it. Spam Statistics Currently the world's worst offending country is the United States, followed by China and the Russian Federation. America has adopted the CANSPAM act which is aimed at reducing spam, but this has yet to show sig