Category Archives: Articles

10 PHP FREE Chat Scripts

Chatting online with friends or even with strangers is something we cannot leave without (I guess? lol). So we thought we would share 10 FREE PHP chat modules to help you with that ;) They are useful for web developers. Few of them are so simple that even a kid can install them! Happy chatting!

1. PCPIN Chat

A free resource of powerful and secure professional homepage tools developed in PHP with MySQL backend.

2. Voodoo chat

Voc is a stream-chat engine which is designed to work on high-loaded chat-servers. It is written in PHP, but uses Perl or C++ for Voc-daemon — the special program to handle multiple user-connections.

3. AJAX Chat

Features:
> Easy installation
> Usable as shoutbox
> Multiple channels
> Private messaging
> Private channels
> Invitation system
> Kick offending Users
> Ban offending Users
> Ignoring offending Users
> Online users list with user menu
> and many more…

4. Freeshoutbox

A free shoutbox host Features: – HTML-code, so you can implement your shoutbox onto your site/forum/portal/blog/whatever – Unlimited space/bandwidth – Fast & reliable server – Many templates to choose from, or create your own

5. phpFreeChat

A free, simple to install, fast, customizable and multi languages chat that uses a simple filesystem for message and nickname storage. It uses AJAX to smoothly refresh (no flicker) and display the chat zone and the nickname zone.

6. X7 Chat

A complete recode of X7 Chat designed primarily with efficiency and stability in mind.

7. BlaB! Lite

BlaB! Lite 5 (freeware) BlaB! Lite is an AJAX based and best viewed with any browser chat system that supports MySQL, SQLite & PostgreSQL databases.

8. Java Chat script with PHP backend

A chat software that allows the users of a website or a private network to communicate with each other. The software includes: Java/JavaScript client application. PHP/MySQL chat server.

9. The Hablator

Is an advanced GPL’ed chat script written in PHP and JavaScript. It offers all of the features you could want in a chat script, while maintaining low server requirements, low client requirements, exceptional speed, and simple installation.

10. GrezorTeamSpeak – a simple PHP/Ajax chat script

This application is a simple chat written in PHP/JavaScript. It does not require any database or special software.

All PHP Scripts on this website are provided by phpscripts4u.com where you can find all the latest PHP code snippets, plugins and libraries.

6 PHP Form Scripts

These are just some PHP scripts that will help you build better and more usable forms with a few click or drag and drops. However, these are not free, but you can get a lot of features for a few pennies ;)

1. Quform (aka iPhorm)

A simple yet powerful ajax contact form that you can easily embed into any web page in a matter of minutes. It does everything without reloading the page which makes for a sleek user experience that is sure to make a positive impression when your visitors contact you.

2. Awesome Contact Form

Is the PHP contact form. It’s easy and straightforward to set up, and can be integrated into your site with two simple lines of code! Includes bonus features such as a customizable auto-responder, form validation and support for any HTML fields out of the box.

3. Reformed – Themable Form Builder

An HTML5 app that allows you to quickly and easily build robust, great-looking web forms. Client-side validation is also built in, using the jQuery Validation library, and can be easily applied to any form element via a point-and-click interface.

4. HTML5 Ajax Contact Form with Google Maps

A php contact form that leverages the power of HTML5 , Ajax, and Google Maps.

5. Drag and drop form manager

> Embed forms to your php or html files,
> Admin Login
> Determine your form and field details easily – Add, edit or delete forms and fields to the forms easily – Drag and drop to change the order of fields, forms or options of dropdown, multiselect, checkbox lists and radio groups. – Edit form name and description easily – Determine the e-mail address that you want the form to be sent. – The form automatically creates attachments to e-mails when file fields are added.

6. Visual Form Builder

Enables you to create beautiful HTML5 forms in seconds. Each form has integrated client side and server side validation, and is compatible with all browsers (even IE6 ).

All PHP Scripts on this website are provided by phpscripts4u.com where you can find all the latest PHP code snippets, plugins and libraries.

Tips to Speed Up your PHP Applications

PHP can be quite slow at times. Maybe because we do things we shouldn’t or maybe because we didn’t know the alternatives. So here we are giving you some tips to help you speed up your PHP applications. Enjoy!

Calculate the array size ahead

We usually see codes like this:
$myArray = array(1, 2, 3, 4);
for ($i = 0; $i <= count($myArray); $i++) {
    echo $myArray[$i];
}

What’s wrong with the code? Every iteration

$myArray

is recounted — a huge waste of time. Instead, use this:

$myArray = array(1, 2, 3, 4);
$amount = count($myArray);
for ($i = 0; $i <= $amount; $i++) {
    echo $myArray[$i];
}

Leave foreach() alone!

Do not use

foreach()

under any circumstances anymore since it has been proven (by several benchmarks) to be extremely slow.

Example of an inefficient piece of code which uses

foreach()

:

$myArray = array(1, 2, 3, 4);
foreach ($myArray as $value) {
     echo $value;
}

Instead, just use regular for: They do exactly the same thing, but this one is much faster!

$myArray = array(1, 2, 3, 4);
$amount = count($myArray);
for ($i = 0; $i <= $amount; $i++) {
    echo $myArray[$i];
}

Stay away from Double Quotes as much as possible

Double quotes search for variables within the string which takes up time; and if there’s no variables within the string then it’s pointless to use double quotes. Double quotes (” “) should only be used when needed, otherwise you should use single quotes.
Use echo Efficiently: PHP has to concatenate “Hello” and the value of

$myVar

, and then output it.

echo "Hello" . $myVar;

However, if you use a comma like this: PHP does not have to concatenate the “Hello” and

$myVar

, instead it just outputs both of them.

echo "Hello", $myVar;

All PHP Scripts on this website are provided by phpscripts4u.com where you can find all the latest PHP code snippets, plugins and libraries.

PHP Interface and Abstract Explained

This is going to be very simple explanation between interface and any abstract. We are not going to go as far as “you cannot instantiate an interface or an abstract… blah… any class with an abstract method should be declared as abstract.. etc.”

So, where and when to use interfaces? Normally people will use interface when abstracting becomes a problem.

Let’s say we have the following as example:

<?php
Person
Employee
Employer
Criminal
Rapist
President
Student
?>

Obviously, Employee is a Person, Criminal is a person etc.. Therefore we can have Person as a PARENT class. For person to be abstract, you decide within your application if a person object makes sense… just to not have alien objects.

Now, interfaces are used when, in a group of objects, you have two or more objects that share similar behavior. For instance: President and Employer will

makePolicy()

while Criminal and Rapist will

commitCrime()

. Having said that, normally people would put these methods in their respective classes (but defeating the OO designs). If you put

makePolicy()

in President and Employer class there will be duplication of code. It’s not a good idea as Student or Employee will not normally

makePolicy()

or

commitCrime()

. In fact, it means Employee object can

makePolicy()

of increasing salary ;) . Therefore in this case we use INTERFACES.

<?php
 interface HighOffice {
   public function makePolicy();
   public function declareEmergency();
}

 interface jailable {
   public function commitCrime();
   public function appeal();
}

abstract class Person {
  public function getAge()
  {
    return "28years";
  }
}

public class Employee extend Person {
 //do stuff for employee
}

public class Criminal extend Person impliments jailable{
 //do stuff for a criminal.
 
 //these must be present.
  public function commitCrime()
  {

  }
  public function appeal()
  {
  }

public class President extend Person impliments HighOffice
{

  //do other stuff for President

  //then a President should make policies and declare emergency
   public function makePolicy()
   {
    }
   public function declareEmergency()
  {
  }
}

}
 
?>

All PHP Scripts on this website are provided by phpscripts4u.com where you can find all the latest PHP code snippets, plugins and libraries.

10 FREE Multimedia PHP Scripts

PHPScripts4u uncover the best FREE and / or open-source 10 pretty cool Audio Players and Gallery, Multimedia, Scripts and Programs based on PHP scripts that you can integrate into your website. I hope you like it! :)

1. Clip Bucket

This script comes with all the bells & whistles required to start your own Video Sharing website like Youtube, Metacafe, Veoh, Hulu or any other top video distribution application in matter of minutes.

2. VESPA

An open source PHP script to read all MP3 files of a certain web directory and enables navigation through its sub-directories. VESPA uses the wonderful getid3 library to extract file information.

3. jsMusicBox project

Music player built with just JS, PHP, and HTML.

4. netjukebox

A web-based media jukebox for MPD, VideoLAN and Winamp/httpQ. netjukebox is open source under the GNU GPL license.

5. Vidiscript

Lets you set up your very own Youtube / Dailymotion clone site – with a ton more extra features. Vidiscript is a 100% FREE video sharing script.

6. AmpJuke

A PHP-script that runs on Linux/Unix using Apache and MySQL. Once installed, AmpJuke can stream music to one or more remote clients (f.ex. PC’s) on a LAN and/or the internet

7. Moe Music

A web-based front-end to mpg123. It uses mysql as a back end database for storing songs and keeping queues. Moe Music is intended for use at LAN parties or anywhere else sound for a room is needed, as the music is played from a central server.

8. Webbased Music Jukebox

A PHP based jukebox for playing MP3 music straight from your Linux server. It creates a database of all your MP3 files with detailed header information(ID3). The jukebox can play in random, single and playlist mode.

9. WebMplayer

Is a free webbased frontend for Mplayer to manage and play music-files & audiostreams.

10. RIMPS

A web-based frontend, written in PHP, to make Apache an MP3 and Ogg server. It’s complete with searching, individual song playing, and playlist creation.

All PHP Scripts on this website are provided by phpscripts4u.com where you can find all the latest PHP code snippets, plugins and libraries.