HTML encode your e-mail address with PHP to avoid spam bots

HTML encode your e-mail address with PHP to avoid spam bots

Email spam is an everyday nuisance to most people which is usually generated by relentless spambots crawling the internet and source code of your page to gather email addresses on mass. They simply consume addresses on a fairly consistent basis in order to sell them or spam people, or both. Google also indexes email address but that’s all it does, index, so no harm there. Nobody wants spam in their email but of course there is often a need to display your email address on your site or blog to allow people to touch base with you and doing this poses the risk it’ll happen. Often this is the core reason for your spam influx!. There is an answer to avoiding the spambots causing an invasion to your inbox Continue reading

WordPress – tag post appending plug-in…..

WordPress – tag post appending plug-in…..

Wordpress plug-ins
I’ve been using WordPress more and more recently as it’s an ideal platform to speed up development of sites with the additional benefit of it being a well respected CMS and allows the site owner to update content through the interface with no knowledge required of HTML. There’s an abundance of available themes and some great ones which are free with a one click install. Even better and more importantly it’s simple.

Anyway, I’ve always dabbled with WordPress and had an interest in it. There are alternatives in Drupal, Joomla and of course custom builds but WordPress is adequate for most requirements. These days I’m trying to get a better understanding of how the platform works in it’s life cycle as more jobs require some knowledge of it. I often use the available plug-ins with my install but haven’t really dabbled until now with their inner workings. Anyway, having got a fundamental understanding of them recently and realised how useful some plug-ins can be I decided to write a few very simple ones of my own, just to get me started. Continue reading

Getting WordPress post titles asyncronously using Ajax…

Getting WordPress post titles asyncronously using Ajax…

Ajax logoAssuming you already have a pretty good knowledge of JavaScript, this post should just be recap or simple enough to understand.

I know this method can also be done using the YUI framework with slightly less code but I wanted a relatively simple, raw and quick way to populate a div using Ajax to dynamically update my most recent WordPress blog posts on my homepage. I built my site before WordPress got the in thing, so i just skinned a theme and went from there. I’d previously been using a JavaScript jump list which I’d had to manually update after each post and it was tedious work. I’ll show the YUI example also later. For this simple task though, I chose 5 posts (or my page) as being an ample amount to display (later cutting that to the the most recent post) and as I’ve been dabbling with Ajax recently, I thought I’d use that method and a server side PHP module to interact with the Ajax via a GET request, communicating asyncronously on page load. For testing, I kept all the code in just one page just to make matters simple and debugging easy but naturally as I want to use an unobtrusive method and in order to remove clutter, I later removed the JavaScript into an external file of it’s own. Continue reading