Thursday, October 4, 2012

How to take screenshot from video in php

Here i am going to explain you how to take screenshot(thumbnail) from video in php. First Of All we need to installed ffmpeg on our server.If your server does not have this facility please contact your web hosting provider. function captureImageFromVideo($imagename,$videoname)  { $ffmpeg = '/usr/bin/ffmpeg'; //video dir $video = '/public_html/video/'.$videoname; //where to save the image $image = '/public_html/image/'.$imagename; //what time to take screenshot from...
Read More »

Wednesday, October 3, 2012

How to create zip and download

In this post I am going to explain you how to create zip file and download. We need some files on some directory which we will zipped by code. For this task we are using PHP zip library, it must enabled on your server. Here is function function zipFilesDownload($file_names,$archive_file_name,$file_path) { $zip = new ZipArchive(); //create the file and throw the error if unsuccessful if ($zip->open($archive_file_name, ZIPARCHIVE::CREATE )!==TRUE) { ...
Read More »