Images to Video making php script using FFMPEG

Hi Geeks,

This Article is based on

Images to Video making php script using FFMPEG

,  So I am providing you the complete steps to setup the FFMPEG in windows and linux environment.

FFMPEG is very good Extension for php where we can process many type of operations on audio and video like

Images to video convert ,images and audio to video ,Generate Thumbnail file from video. So I have tried it on my windows system .

Steps to install FFMPEG on windows or localhost:

Step 1: Download the Static build for windows from following page

there will be a button for download as in the screenshotdownload_ffmpeg


Step 2: Install prerequisite extensions

Before making any php script please make available the GD2 Library from your php.ini by just uncommenting following lines(removing semicolons from start of these lines


Step 3: Extract the downloaded zip and Inside Bin folder you will find ffmpeg.exe

Copy that file in your project folder in htdocs Eg: slideshow_project

Now we have all images which we need to convert into video are in any folder of this projects like Images:

there should be pattern of images name like pic1.jpg,pic2.jpg as so on…

Step 4: write and execute a command for images to video conversion, following is the command

above command is useful with creating a slideshow video where 2 second images will change and if you want to increase slide change duration for 3 second then you need to replace 1/1 to 1/3   from above command.

Now if you want to mix audio along with images then following command will work

Assuming you have my_recording.mp3 in audio folder of project

Installing FFMPEG in linux servers by following command

In that case you don’t need to follow  Step 1 and Step 3

If you are having any problem then please put your comments below , I would love to help you

Implement Stripe in 3 steps using php

Hi Geeks,
This Article is focused on Implement Stripe in 3 steps using php, where you can easily accept payments through stripe by using this code. the stripe checkout.js
is used here with server side code also.

Step 1: Create a product list page named index.php with following code:

Output Screen for this will look like this:


Note: you can get products from database also,but here for demonstration i am showing these static.

Step 2: Create a Checkout Page with name pay.php, here you need to replace the stripe public key mention in the comment also.

Output Screen:


Step 3: Create a server side script for charge customer named as charge.php with following code, here you need to replace the Stripe private key mention in comment also:

Output Screen:


Note: there should be a stripe library in the root folder you can download it from here:
and extract it with name stripe as you can see in following screenshot


Still you have any problem in integrating you can directly call me and i will send you the complete working code,

you can comment here or send me a email on




Hi Geeks,
I am sharing you a program for creating a captcha script using php and javascript. Following are the simple steps to create captcha in php

Step 1: Create a php script named ‘captcha.php’ with following code that generate and return a captcha image.

Step 2: Now create a captcha.js file and put following code in the file.

Step 3: Now we need to create a Placeholder Element inside the form as following:

Step 4: Now after submitting you from validate the captcha was right or not. So in your form submit action use following code.

Note 1: In which page/form you are using the capcha , there should be session start in top of the file as following:

and also include the js file in your php page head section. jquery should be available before the captcha.js inclusion as following:



Pagination code using php and mysql

Hi Geeks,
We have gone through some user requests for pagination code for php mysql project.So we have created a simple class where you can easily create pagination for any grid or listing. following are the simple steps for making a pagination system in php.

Step 1: Create a class file ‘Paginator.class.php’ in your project with following code snippet

Step 2: Include the paging class before extracting data to show

Step 3: Now extract the data for any page as following

Step 4 : Now we are ready with data. So just showing the data and links as following

> Show the data first and after it showing the pagination links as following:

> Show the paging links after the data



form validation library in php

Hi Geeks,

Today i am sharing a generic class for

Form validation library in php

&  it also populate if form validation failed. First of all you can download the ‘form validation library in php’ by clicking on following url.

Now in this class you can validate the require,numeric,file-extension,match password & confirm password,validate url and other validation also.

It is having a validation with database like is_unique in mysql database where you need pass the db connection if you want to user is_unique validation.

Step 1: Include & Initialize the class in header or before your form s following:

Step 2: Create a HTML FORM

we are assuming that we have a form for add/edit ‘Advertise campaign’ form

Read the full comments in code


Step 3: Create a Table for advertise add/edit using following sql dump

Step 4: Now need to post the form and recieve data and show errors, Recieve post Before the HTML form

Please Comment If any problem in this. I’ll assist you to use this form validation library

How to work with AngularJS as frontend and PHP MYSQL as backend

Hi Geeks,

In this tutorial you will learn that how to work with AngularJs as web frontend or in any hybrid app and get retrieve data from database using php and mysql. We have created restful webservice for return records to angular app.

Now steps for making a angularjs app with php and mysql –
Step 1) Create a database and table for fetching content from the table
Note: If you want to use existing database then select you db else create a new db with ‘news_db’ or whatever you want to take a db name.
Now Create a table named ‘news’ for getting data by following sql statement

Now Dump some dummy records by following insert statement:

Step 2) Create a file named config.php with following code

change credential according to your database and server host
Step 3) Now create a file for webservices named wsdl.php
Define Cross origin headers in this file by following code

Now code for getting data from database and provide in restful json format by following code

So complete Code for wsdl.php is following

Step 4) Now Start with frontend
Step for Getting data from database using angularjs as frontend and php & mysql as backed
make a file named index.html
include the script which i have attached with this post

Now make a ng-app with following html

make a html table format inside the div for getting data from datasource(php/mysql restful service) as following

Now put the script that call the restful web service and load data to the table

Now complete Code for index.html

Congratulations you have completed with this tutorial please provide comments for this tutorial. [viraldownloader id=146 text=’DOWNLOAD COMPLETE CODE’]

Array to Xml Conversion and Xml to Array Convert in PHP

Hi Geeks,
Today i am sharing you a code snippet for converting xml to array with attributes also and vice versa (Convert array to xml). This class is very useful to parse rss feed and to make rss feed in php programming.

In this code snippet we have made a class to convert array XML using php code and also retaining its attibues stored into array . It returns the XML in form of DOMDocument class for further manipulation. This class will throw exception if the tag name or attribute name has illegal characters.

Usage of this class:

A. Steps for Convert Array to Xml

1.Create a class named Array2XML with following code in file Array2XML.php