Archive for Development

How to setup Tucows OpenSRS

OpensSRS is a domain reseller system offered by Tucows to internet service providers.

Although Tucows offers a very flexible system, there’s a serious lack of easy to follow documentation.

This document will explain how to get your tucows opensrs reseller account up and running with full access.

Read the rest of this entry »

Comments (2)

Creating a Digg clone for your niche market

First of all you need to choose your weapon:

  • Code your own
  • Pay someone else to code it for you
  • Use an already existing open source CMS

Read the rest of this entry »

Comments (5)

How to correctly make a PHP contact form

I use contact forms on many websites, and over the years I have discovered many problems with using them, including hijacking, mail injection, server hacks, XSS and platform issues.

The main cause of this is simply due to lack of validation and error checking.

Firstly you must fully understand how forms work with PHP. When you set the form “method” to POST, it sends the data to PHP as a super global variable called “$_POST”. In the HTML each “input” has a “name”, that is used to identify the related data.

For example, there is an input field named “message”, to retrieve this in PHP you simply use “$_POST[‘message’]”, we will be using this method to pass the data between the form and PHP for processing.

This is a fine example of how NOT to do it, so what is wrong with this method you may ask?

Here are some of the issues we need to overcome:

  • Data directly input into the mail() function without processing
  • Does data from input fields contain malicious code
  • Check user input is not empty
  • Validation on user inputs
  • If the email address the user entered is real
  • Whether the email successfully sent or not
  • Ensure the correct data is processed
  • Which website the form was sent from
  • The IP address of the sender
  • Display the form at appropriate times
  • Append additional fields to the end of the message

Download here: PHP Contact Form by HM2K v1.0.1

The comments I have made within the code explains the reason what it does, and why it is included.

I hope this solves some of the problems people experience with contact forms.

Additional Notes:

Comments

Social Bookmarking

Today I looked into social bookmarking.

Social bookmarking has been around for quite a while now, it’s a great way to bookmark your links, and share links with others.

Sharing your bookmarks

In the past people have asked me how to go about how to export their bookmarks from their browser.

First of all I would like to say that if you are currently using Internet Explorer, you need to stop, and download a copy of Firefox.

Once firefox is installed you will be asked to follow the setup. At this point you can import your settings (including your favorites) from Internet Explorer. I would recommend this.

Now you have all your bookmarks in one place you can begin to organise them into folders and section them off making it easy to browse them. You can do this by using the “Bookmark Manager”, which is located under the file name as Bookmarks -> Manage Bookmarks.

Once you are all organized and ready to go you can simply select File -> Export, which allows you to export all of your bookmarks to a HTML document, which you can then use to share with others to send via email or place on your website.

Its also useful if you like to clear out your bookmarks every so often but keep that as a backup.

It could be also be useful to know that there are website bookmarking services known as Social bookmarking available which allow you to access your bookmarks from anywhere in the world. Probably the most popular is del.icio.us, or perhaps Furl, check them out, they are free to use.

I also do recommend taking a look at Google Bookmarks and if you use Firefox, take a look at the GMarks plugin.

Making your blog more socialable

After spending some time looking for “social bookmarking” scripts for wordpress, I discovered that there really is just one real option out there.

All the details are on the site, you can easily add it onto your blog, and start being more sociable!

Other points of reference:

Comments (1)

Finding a Portal Script

I spent a long time today searching for a PHP based portal script either for a small community website or an ISP.

What I am looking for as a small community is a basic version of what thisisstaffordshire.co.uk offers or similar.

What I am looking for in an ISP community website is a basic version to what orange.co.uk (formerly wanadoo/freeserve) offers or similar.

My theory was that something like this would exist already, after all there’s no point re-inventing the wheel, or at the very least I would be getting a feel for what was already out there.

So I began looking in all the normal places, starting with sourceforge.net, where I found nothing decent. I then began looking on hotscripts.com where there is an entire directory just for PHP portals.

I soon discovered that the majority were either PHP-Nuke based or PHP-Nuke like, which is NOT what I am looking for, others were basically a CMS package, not a portal.

Eventually I came across a portal called Creative Community Portal, which looks like it would be perfect for the small community website so I take a look. I’m taking to a website called Creative Software. They are offering this script at $79.99, however I soon realised that these guys aren’t the best at web design, yet it strikes me as odd that they have quite a tidy portal script on offer, my assumption was that they had taken it from somewhere else, and so my research begins.

I began by trying to find other sites that use the same engine by searching for the names of the images, and common strings.

I find the following websites:

  • http://www.spioneers.org/Default.php
  • http://www.omeopatiadirisonanza.it/Default.asp
  • http://www.4so9.com/cauca/default.php
  • http://www.seniorschoice.com/kelowna/Default.php
  • http://www.mcintyreskiarea.com/Default.asp
  • http://www.clubgs.org/Default.asp
  • http://www.prodavisro.com/icoane_site/Default.asp
  • http://www.yuccavalley.com/genealogy/Default.asp
  • http://www.rincenatiarna.com/members/AccessDenied.cfm
  • http://www.mntalent.com/Default.asp
  • http://sleeping.mine.nu/parisian.org/Default.php
  • http://www.pataleo.com/Default.php
  • http://www.watersport.net/portal/Default.asp

The first thing you should notice is that they all appear to be in different programming languages, and none of them use the same design as the one I found originally, yet they are all closely matched. I figure there must be some kind of third party code generating software being used.

So I take a look at the HTML code of some of the sites.

Its not long before I find this:

So I decide to take a look at YesSoftware CodeCharge v3.0.1.6, and I believe I am onto a winner as I find that an example script bundled with the software is infact a portal! And as if that wasn’t enough I found mention on their forums of an online portal which can be downloaded from gotocode.com for free.

The problem I found is that none of these look anything like the sites above, let alone the site I found originally. The search continues.

I go back to looking for similar sites.

Its not long before I find this: http://www.uksamba.org/portal/Default.php

On this site I find more details, including a user guide, license agreement, and more importantly the name of the company that made it, UltraApps. However, when I visit their website, there’s no mention of this application. Never fear though, there’s always the web archive.

The rabbit hole deepens.

I soon find myself on their old website, via the web archive looking at downloading their portal script, there it is, you can download it for free. I download the PHP version and have a play around with this for quite some time. I find two problems, firstly this does not offer all the features that the Creative Software version does, and secondly it doesn’t appear to login for some strange reason.

I go back to the UltraApps web archive, and discover there is another version, which is the Portal Enhanced Edition, which is NOT free, you must purchase this at a price of $50. I figure I have come to the end of the road with this as without paying somebody some money I’m not getting it for free, and as such UltraApps don’t appear to offer it any longer, and Creative Software doesn’t actually have the right to be selling it in the first place.

So as I begin to close down my windows, I notice something strange on the Creative Software “demo” site, the title says: “My USA City Guide”, this strikes me as odd, as their demo is a UK version.

After a quick search I find this demo, which appears to owned by the creators of the style/theme, yet appear to be using the UltraApps code.

I gave this some thought, and I soon realise that this begs some questions:

  • Why does UltraApps no longer offer their portal?
  • Is there an issue with selling applications produced by YesSoftware Code Charge?
  • Does the USA City Guide have the rights to resell the UltraApps product?
  • Does Creative Software have the right to resell the USA City Guide product?

Further more I found that the Creative Community script had some major vulnerabilities.

And after all that I have no decent portal script for a basic small community website.

The only half decent thing I found was called phpFoX, and by a look at the demo, its simply a clone of MySpace, which is NOT what i’m looking for. Despite the fact that it’s expensive.

Comments (3)

« Previous Page« Previous entries « Previous Page · Next Page » Next entries »Next Page »