Browsing all articles tagged with Codeigniter
Jul
4

Codeigniter Tutorial: How To check Username/Email availablity using jQuery in Codeigniter?

This post is for CI lover who wants to learn Codeigniter. This script will show you how can we check live availability of username or email using Ajax in Codeigniter. Using this tutorial you can also understand how can we send a jQuery Ajax request to server living in CI.
read more

Jun
30

CodeIgniter Tutorial: Upload and Convert video to FLV using FFmpeg.


Today, I will show, how can we upload and convert a video file to flv using FFmpeg in CodeIgniter website. FFmpeg commands runs in Linux but in Window server we need to download FFmpeg.exe file from its site. Which we have to put in our site root folder. IF your server is Linux then you also need verify that your hosting server has FFmpeg installed or you need it to be installed. For checking FFmpeg availability print phpinfo() in any file and run this command on server where you will get PHP version and other server settings. Find FFmpeg on that window if it doesn’t found then it means server has no FFmpeg installed.

Here is uploading code of video file in CodeIgniter.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
$file				= 'video_file';
$config['upload_path']		= './video_folder/';
$config['allowed_types'] 	= 'mov|mpeg|mp3|avi';
$config['max_size']		= '50000';
$config['max_width']  		= '';
$config['max_height']  		= '';
 
$this->upload->initialize($config);
$this->load->library('upload', $config);
 
if(!$this->upload->do_upload($file))
{
	// If there is any error
	$err_msgs .= 'Error in Uploading video '.$this->upload->display_errors().'<br />';
}
else
{
	$data=array('upload_data' => $this->upload->data());
	$video_path = $data['upload_data']['file_name'];
 
	$directory_path 	 = $data['upload_data']['file_path'];
	$directory_path_full      = $data['upload_data']['full_path'];
	$file_name 		= $data['upload_data']['raw_name'];
 
	// ffmpeg command to convert video
 
	exec("ffmpeg -i ".$directory_path_full." ".$directory_path.$file_name.".flv"); 
// $file_name is same file name that is being uploaded but you can give your custom video name after converting So use something like myfile.flv.
 
	/// In the end update video name in DB 
	$array = array(
		'video' => $file_name.'.'.'flv',
		);
	$this->db->set($array);
	$this->db->where('id',$id); // Table where you put video name
	$query = $this->db->update('user_videos'); 	
}
May
12

CodeIgniter Tutorial: How to Create Ajax Pagination using CodeIgniter?

ajax-pagination

CodeIgniter has many built-in classes and plugins. Pagination class of CodeIgniter is very easy and simple to use. Also Ajax Pagination library is availanle in Codeigniter. Here i will describe how to create simple ajax pagination in Codeigniter using some simple steps.

read more

Apr
22

How can We Integrate the Authorize.Net Payment Gateway in Codeigniter?

Authorize.Net is my favorite payment mode for using in web development. It is simple, easy and secure payment connection. I use authorize.Net in my codeigniter based projects and here is the code and downloads.

read more

Apr
20

30 Top Codeigniter best Tutorials You must want to know.

Author ZeeShaN    Category Codeigniter, Web Development     Tags

Code Igniter is best framework and has an extensive community to help you always. Lot of tutorials are available  online. Here i have given some best tutorials.

read more







Enter your Email:

Click Here for Popular

Who I Am

Zeeshan Rasool

Software Engineer - PHP
Lahore - Pakistan

zeeshan(@)99points.info
Skype: zeeshan-rasool
gTalk: zishan.rasool85

Categories

Tags

Comments