Registration API and No More PEAR – Version 2.2 Of Broadfast Autoresponder Is Online

We had some customers complaining that PEAR was hard to set up or was unavailable in their hosts. So here is the answer, no more need of PEAR! The latest version of the php auto responder uses the best mail sending library out there – SwiftMailer. This leads to the following new features:

– Sendmail and SMTP email sending. Now it’s easy to choose between three protocols – PHP Mail, Sendmail and SMTP without the need to install anything else on your server.
– Attachments. Although we had a way to include files through “Files and Links” menu, looks like most users prefer to directly attach files to their emails. Well, this is now possible.

Another important addition is the registration API which allows advanced users to program user registrations through some other software. This can be very useful if you have existing membership system, blog or forum.

The price remains $37 for this version, but you should expect an increase soon, so it’s better to order now.

56 PHP Scripts That Will Help Your Website Make More Money

While it’s always a good idea to get custom developed enhancements for your sites, using ready scripts can save a lot of time and money. Look at the list below: all these software products can help great deal to make more money with your sites.

Besides that, looking at them can give you a lot of ideas for further growth and improvement. I know doing the research for this post generated many new ideas for me.

Wikis

Niche wikis can feed your site with user generated fresh content. This may improve your rankings in the search engines, your traffic, sales, ad revenue and so on. Users who contribute content often eagerly promote it as well.

Tiki Wiki is one of the most popular wiki softwares and it’s a lot more than wiki – integrates blogs, forums, image gallery and more. And it’s free.
Wikiwig is also free and has a visual editor which will save you and your users from learning a wiki language.

Web Fetching and Content Agregators

Publishing duplicate content shouldn’t be the primary way to enrich your website. But smartly placed and relevant news, reviews and comments can improve greatly the user experience and increase the pageviews and the revenue it generates.

PHP RSS Reader – very professional RSS agregator although a bit expensive (from $97 to $297)
Free RSS to HTML PHP Script – here is a free alternative but without an administrative panel and not many features.

Communities, Social networks and Dating

Before starting a community or social network around your main site make sure you have a clear idea how it is going to be unique as these things are very hard to raise up and make alive. For sure you should think about niche (related to your main site) network or dating site, not a general one.

If you can do it successfully it will turn into very powerful free advertising and broadcasting platform for your main business.

Facebook page or group. This is not really a PHP script but I ought to mention it. Before investing time and money into buying or developing your own community, try to start a Facebook fan page or group around your niche or site. If you can make the page active, you have a chance to go further.

BuddyPress is a great social network for WordPress sites. It’s free and quite well supported with many themes and plugins.
Dolphin 7 is a high profile free social network engine. Very popular and feature rich.
SocialEngine is commercial and judging by the users feedback it’s well worth the money.
Chameleon is good if you want to start a niche dating / match-making site. Starts from $597.
VidPersonals is another good dating software with multimedia support. Starts at $99.

Membership Areas, Subscriptions, User Management

Sometimes the best way to monetize your expertise and knowledge is not through consulting or through offering it for free and earning from advertising. Sometimes the best idea is to protect more advanced pieces of your content and to charge for access to it. Here are some good softwares which can help you do this:

Quadodo is one of the free solutions. It’s not very fancy but does most of what you may need.
OmniSecure looks better, does more and has good support. Of course this comes with its price – the software price starts at $197.
aMember is might be the most popular solution famous for the large community around it.

Sharing and Recommendation

When users share your content this leads to more new visits and pageviews. Besides that people tend to trust their friends a lot more than other forms of recommendation so usually this kind of traffic is very efficient.
addthis.com isn’t exactly a PHP script or at least not one that you can download and install on your server. It’s a free web based service that will provide the most popular social media icons at the bottom of your pages. It’s very easy to use and you don’t need to care about updates etc. They also provide analytics so I decided it’s well worth including in this list.
Omnistartell is one of the good options if you want to host the widget yourself. This will cost $57.

Reviews, Ratings, Polls and Voting

The most important things that these tools do are two: they increase visitors participation and engagement with your site and they can provide a very important social proof for the quality of your products or services.
MicroRate is a basic but free script that will let your visitors rate your content or products.
Five Star Review Script is more comprehensive Amazon-style rating widget. It’s a bit pricey however, starting at $50 per year.
StarsRate – another paid one, but it’s good and costs only $28 one time fee.
LimeSurvey is a lot more than a rating tool. It’s fully functional survey software and is open source and free.

Email Newsletters and Autoresponders

Keeping in touch by e-mail is one of the most powerful ways to get your visitors visit your site again, buy from it or subscribe for your affiliate offers.
Inout is a complex and feature rich mailing list manager for $49.
BFT Autoresponder combines simple and easy to use mailing list manager with autoresponders. All for $37
Tellmatic is for you if you are looking for something free and open source.

Image Galleries

By themselves image galleries don’t usually make money, but they are huge link and traffic magnet.
Piwigo looks great and is free open source solution
Coppermine is also free and although I dont like how its code is written, it’s quite good and can be used as photo contest as well.
TinyWeb Gallery is also free, supports video, has ajax and flash effects, really cool one.
PhotoStore is commercial solution with a bit different purpose – it allows you to sell images. It can be a very powerful revenue generating tool if you have original niche photos.
– Another photo store is Pixaria which is one of the most popular commercial solutions ($249)

Graphs and Charts

Graph and charts can help you make great infographics and visualizations that often attract links or lead to social media shares and bookmarks.

FusionCharts is very impressive commercial package having several licenses (start at $69)
MaxChart are simple but free. Good enough for basic charts.
JPGraph was the first I have ever used. A bit complicated but offers very big variety of charts and a high level of customization. There are free and commercial licenses.
AMCharts are easy to use flash based charts. Very modern looking with reasonable level of customization options.

E-commerce Systems and Tools

These scripts are intended to help you directly make money from your site. Of course you need something to sell – it could be software, movies, music, books, or even physical products like furniture, cars and clothes.
JShop Server is one of the best rated tools in this category. I have not tried it myself, but it looks promising. GBP 200.
CS Cart is also a commercial shopping cart software but it has a 60 days free trial. Very modern outlook and seems to be easy to use.
Oscommerce is the most popular free open source shopping cart solution. I am horrified by its code and I don’t like the administration panel but it’s free and popular and there are a lot of modules, plugins and themes for it.
Squirrel Cart is reasonably priced commercial software that has all the features of the more expensive ones.
– Years ago CubeCart was my favorite. I have not used it recently but I believe it’s probably still good. And the price is very decent, having even a free version.

Forums

Forums can make some money by showing advertisements but their effect is stronger in an indirect way – they are great to keep users interest in your site and to build more trust, traffic and links to it. Just have in mind that starting a forum is not an easy thing to do because no one wants to post in it while it’s empty.
PunBB is cute little forum, very easy to integrate in existing site and customize. It has just enough features in most cases.
SimpleMachines is for you if you need more features. It has everything that the commercial forums do.
vBulletin is widely considered the best forum. It’s commercial but sometimes is worth the money especially if you are sure your forum will be active. I don’t think it’s better than SimpleMachines but most people are familiar with it which reduces the barrier to participation.

Customer Support

If you sell anything on your site you should think about customer support software. Not only it will reduce the time you spend answering emails – it will also improve your customer supports which leads to more happy customers spreading the word about your products or services and thus to more sales.
Iscripts SupportDesk is a support suite containing everything you may want to use for customer support for $147.
HelpdeskPilot is modern looking and fully featured software with 15 days free trial. The prices for the licenses are a bit steep however, starting at $399
HESK is one of the few support suites that have free versions. The paid licenses are also very reasonably priced, just at $39.
– Here is a completely free one: TrellisDesk! Regardless of being free it’s a very high quality support desk software.
LiveHelp‘s main purpose is live support chat and it’s maybe the most popular one. License prices start at $120.
HelpCenter Live is the free open source alternative

Classifieds

Running a niche classifieds section is yet another method to increase traffic or directly make money if you charge for posting classified.
NetClassifieds is one of the easy free solutions which can help you do this
68 Classifieds is a higher quality but commercial one which has hosted license for $40 and downloadable licenses starting at $150.

Blogs

It’s very uncommon to have a popular and lucrative site without a blog these days. Even if you are just selling products and not looking for advertising revenue having a blog can greatly improve the image of your business.
WordPress is definitely the super-leader. This blog runs WordPress, every blog runs wordpress, social comunities, shopping carts, many other sites are based on WordPress. There is no other software category which to have such a strong leader. Besides that it’s completely free!
b2evolution tries to compete by being more than just a blog. Well, WordPress is also a lot more than blog, but b2evolution is at least worth a look.
MovableType used to compete WordPress succesfully but in the recent years remains in its shadow. Still it’s a very good software and you may like it for a change.

Auctions

Running niche auctions can earn you commissions in direct way or just increase the participation and popularity of your site (like the most of softwares reviewed here)
WeBid is open source, free and looks professional. What else you may want?
– If you are looking for penny auction, this Ajax PHP Penny Auction for $99 is a good choice.

Affiliate Programs

If you sell your own products or service, running an affiliate program is a good way to get marketers work for you (for a commission of course)
Postaffiliate is one of the oldest and most popular affiliate program scripts. It has a simple free version and a feature rich starting at $199.
JAM is one of the good Postaffiliate alternatives. I have no experience with it but it has good reviews.

Ad Management

If you are content publisher and/or blogger, then running ads on the site is probably one of the main sources of income. Adsense and Chitika are great, but often the most money are made by selling advertisements directly to advertisers.
A.M.Y. is modern, simple and only $29 with unlimited domains license.
Inout Adserver is a lot more complicated and feature rich but this comes with it’s price, starting at $149
PHPads is simple, modest and free. It can do the work if you don’t need much.

This completes the list. Am I missing an important category or product?

PHP/MySQL Tutorial: Classifieds Software In 1 Hour

In this tutorial we will build a basic classifieds software in PHP and MySQL. The software will do the following:

[ad#square-250] 1. Allow everyone to submit classified (no registration required)
2. Classifieds will be listed in categories
3. The main page will list all categories along with the number of classifieds in them
4. Each category will list the classifieds in it ordered by the time of posting, descending order
5. A small administration will be provided where the administrator will add/edit categories. This page is not included in the tutorial as for testing you can just use phpMyAdmin and add/edit/delete categories from it.

This software will use the MVC concept (although very simple one).

Database Structure

The database structure will be simple. We need 3 tables: classifieds, categories and admin. Here are the CREATE TABLE statements with some short explanation:

CREATE TABLE `classifieds` (

`id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,

`category_id` INT UNSIGNED NOT NULL,

`title` VARCHAR(255) NOT NULL,

`content` TEXT NOT NULL,

`contact_details` TEXT NOT NULL,

`date` DATE NOT NULL

);

Optionally you can make category_id a foreign key to the next table so when a category is deleted, the classifieds in it are deleted too (or use RESTRICT clause and disallow deleting a category that has classifieds in it).

CREATE TABLE `categories` (

` id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,

` name` VARCHAR(255) NOT NULL

);

This categories table is very simple as categories contain only name. You may decide to add description, some kind of status field (active/inactive) and so on.

The following table will contain the login information for the administrator:

CREATE TABLE admin (

` id` TINYING UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,

` email` VARCHAR(255) NOT NULL,

` pass` VARCHAR(100) NOT NULL

);

Most probably you will use only one admin (superadmin), but having a table for the administrator’s login will allow you to add and use more than 1 admin in the future if that becomes a requirement.

Models

As we follow the MVC concept we’ll delegate the business logic of this software to the model layer. Models are PHP classes that control the database operation for creating, editing and showing classifieds and categories.

For simplicity in this tutorial I will use SQL queries inside the models for every database operation. However it’s highly recommended that you use some database class rather than the mysql_query calls. It’s also a good idea to use some sort of ActiveRecord/ORM implementation so add/edit/delete operations can be handled without typing SQL. For example see PHP ActiveRecord or the basic model in Celeroo framework. Discussing ORM itself is out of the scope of this tutorial so let’s continue with the other things.

We will use two models – one for categories and one for classifieds. At this point we will not build model for admin as the only place where we’ll deal with the admin table will be authentication. I am leaving authentication out of this tutorial. You can see how to build simple PHP/MySQL user authentication here.

Model Category:

<?php
class Category()
{
   function __construct()
   {
      // for this tutorial there will be nothing inside this method
      // in the real app you could possibly add some initialization
   }

   function add($name)
   {
      $this->filter($name);
      $q="INSERT INTO categories (name) VALUES (\"$name\")";
      mysql_query($q) or die(mysql_error());
   }

   function edit($name, $id)
   {
      $this->filter($name);
      // add some basic security
      if(!is_numeric($id)) exit;

      $q="UPDATE categories SET name=\"$name\" WHERE id='$id'";
      mysql_query($q);
   }

   // category name allows only alphanumeric
   private function filter($name)
   {
      $name=preg_replace("/\W/","",$name);
      return $name;
   }

   function delete($id)
   {
       if(!is_numeric($id)) exit;

       $q="DELETE FROM categories WHERE id='$id'";
       mysql_query($q);
   }

   // method to list the categories for admin edit/delete
   function list()
   {
       $q="SELECT * FROM categories ORDER BY name";
       $result=mysql_query($q);

       $cats=array();

       while($cat=mysql_fetch_array($result)) $cats[]=$cat;
       return $cats;
   }

   // method to return categories along with number of ads in them
   function list_count()
   {
       $q="SELECT COUNT(tA.id) as classifieds, tC.name as name, tC.id as id
       FROM categories tC LEFT JOIN classifieds tA ON tA.category_id=tC.id
       ORDER BY tC.name";
       $result=mysql_query($q);
       $cats=array();

       while($cat=mysql_fetch_array($result)) $cats[]=$cat;
       return $cats;
   }

   // method to return full category data for a single category
   function select($id)
   {
      if(!is_numeric($id)) exit;

       $q="SELECT * FROM categories WHERE id='$id'";
       $category=mysql_fetch_array(mysql_query($q));
       return $category;
    }
}
?>

Few things to notice here: in the methods that receive $id we are checking whether it is numeric to prevent eventual SQL injections.

Another thing to pay attention to is the LEFT JOIN in list_count method. If we don’t use LEFT only the categories which have classifieds in them will be returned. But we want to show all, even those with zero ads inside.

Then we need a simple class to add a classified and list classifieds:

<?php
class Classified
{
   function __construct()
   {
      // empty in our basic version
   }

   function add($vars)
   {
       if(!is_numeric($vars['category_id'])) exit;

       $vars['title']=mysql_real_escape_string($vars['title']);
       $vars['content']=mysql_real_escape_string($vars['content']);
       $vars['contact_details']=mysql_real_escape_string($vars['contact_details']);

       $q="INSERT INTO classifieds (category_id,title,content,contact_details,date)
       VALUES ('$vars[category_id]',\"$vars[title]\",\"$vars[content]\",
       \"$vars[contact_details]\",CURDATE())";
       mysql_query($q);

       $id=mysql_insert_id();
       return $id;
   }

   // list classifieds in a category
   function list($category_id)
   {
       if(!is_numeric($category_id)) exit;

       $q="SELECT * FROM classifieds WHERE category_id='$category_id'
       ORDER BY id DESC";
       $result=mysql_query($q);

       $ads=array();
       while($ad=mysql_fetch_array($result)) $ads[]=$ad;
       return $ads;
   }
}
?>

The code here is pretty straightforward. Notice the security checks and mysql_real_escape_string calls to prepare the data for inserting in the DB.

Controllers

The controllers are parts of the program which handle the interaction with the user input and prepare the output. In our case the controllers will be simple.

Home page:

This will be index.php so it gets loadedby default. It needs to list all the categories along with the number of classifieds.

<?php
// this may not be required if you use php autoload function
require_once("models/category.php"); // assuming we have put models in models/ folder

$_category=new Category();
$cats=$_category->list_count();

require_once("views/index.html");
?>

As you can see once you’ve built model layer, controllers are pretty simple. This one just creates a model instance $_category and calls the method list_counts to receive array of categories.

Submit classified

We need a page that will allow people to submit classifieds. It will be linked from each category page and the category ID will be passed in the URL. Let’s call this page submit.php:

<?php
// again this may be unnecessary
require_once("models/classified.php");

$_classified=new Classified();

if(!empty($_POST['submit']))
{
   $id=$_classified->add($_POST);

   // redirect to see the posted classified
   header("Location: classified.php?id=$id");
   exit;
}

require("views/submit.html");
?>

This page initially displays the posting form. When the form is submitted, it uses the model add() method to insert the classified, to get its ID and to redirect to the page where the classified is shown. Simple, isn’t it?

Category page

This page will be reached when the visitor clicks a link on the homepage. The links on the homepage will contain the category_id in the URL, for example like this: category.php?id=X. When you see the views everything will become clear.

So here is category.php controller:

<?php
require_once("models/category.php");
require_once("models/classified.php");

$_category=new Category();
$_classified=new Classified();

// select category
$category=$_category->select($_GET['id']);
$classifieds=$_classified->list($category['id']);

require_once("views/category.html");
?>

Note that for simplicity I have omitted the DB connection part from the controllers. It’s highly recommended that you create a file which will create the database connection and then include/require this file in all controllers so the connection is available in them.

Views

Views are the HTML pages that display the content and web forms to the users. They complete the entire software.

You need to create header and footer HTML files. The header will contain not only the visible header but also the HTML head tag with CSS, javascripts etc. Let’s call these files header.html and footer.html and put them in folder views/ where will be all the other views as well.

Home page:

This will be called index.html and is included from index.php controller. Here is the content:

<?php require(“views/header.html”);?>
<h1>Home Page</h1>

<?php foreach($cats as $cat):?>
<div style=”float:left;”>

<h2><a href=”category.php?id=<?=$cat[‘id’]?>”><?=$cat[‘name’]?></a></h2>

<p><?=$cat[‘classifieds’]?> ads</p>
</div>
<?php endforeach;?>

<?php require(“views/footer.html”);?>

Note that in the views I use the alternative PHP control structure syntax. It clutters the HTML code less and doesn’t confuse so much designers that may eventually need to work with your views.

Now this page goes to category.php which lists the ads in a category. Here is the associated view category.html:

Category page:

<?php require(“views/header.html”);?>

<h1><?=$category[‘name’]?></h1>

<p><a href=”submit.php?category_id=<?=$category[‘id’]?>”>Submit classified</a></p>

<?php foreach($classifieds as $classified):?>

<div style=”clear:both;border:1px solid black;padding:5px;margin:5px;”>

<p><b><?=$classified[‘title’]?></b></p>

<p><?=nl2br($classified[‘content’]);?></p>

<p>Contact details: <?=nl2br($classified[‘contacts’]);?></p>

<p>Published at: <?=$classified[‘date’]?></p>

</div>

<?php endforeach;?>

<?php require(“views/footer.html”);?>

Finally we need the web form for submitting new classified. Let’s call this page submit.html:

Submit classified:

<?php require(“views/header.html”);?>

<h1>Submit classified</h1>

<form method=”post” action=”submit.php”>

<input type=”hidden” name=”submit” value=”1″>

<input type=”hidden” name=”category_id” value=”<?=$_GET[‘category_id’]?>”>

<p><label>Title:</label> <input type=”text” name=”title”></p>

<p><label>Content:</label> <textarea name=”content”></textarea></p>

<p><label>Contact details:</label> <textarea name=”contacts”></textarea></p>

<p><input type=”submit” value=”Submit classified”></p>

</form>

<?php require(“views/footer.html”);?>

That’s it! Once you create the database connection and include the file in all controllers, your software will be ready to run.

You can build this software for just one hour.

How to improve the software

Of course this is a very basic and simple classifieds software. Here are some ideas how you can improve it:

– Require registration and allow users login and edit/delete their ads
– Make sure classifieds automatically expire after some time
– Add validations on the submit classified page
– Add contact form to allow visitors contact the classified posters
– Add pagination in the category page
– Format the classified post date to some better human readable format
– Check for duplicate ads
– Allow unlimited levels of subcategories
– and so on

This tutorial is giving you the basic and then you can continue and elaborate the software as much as you wish.

Any comments are welcome.