Archive for February, 2008
World Slimmest Laptop
Add comment February 27, 2008
Other to FLV file conversion in PHP
Hi using this php code any one can convert any video file to flv.
Requirements : ffmpeg software
You can download this software from
http://www.videohelp.com/tools/ffmpeg
Code :
$curdir = define (‘FULL_PATH’, dirname(__FILE__).’/');
if(strstr($_SERVER['SERVER_SOFTWARE'],”Win32″))
$ffmpeg_format = $curdir.”ffmpeg.exe -y -i %s %s”;
else
$ffmpeg_format = “LD_LIBRARY_PATH=. “.$curdir.”ffmpeg -y -i %s %s > /dev/null 2>&1″;
$ret_value = 0;
// prepare ffmpeg command
$ffmpeg_command = sprintf($ffmpeg_format, $video_file_name, $flv_name);
//echo $ffmpeg_command;
if (system($ffmpeg_command, $ret_value) === FALSE || $ret_value != 0) {
// ffmpeg was failed
return false;
}
return true;
Where this php page directory should ffmpeg.exe directory
By the help of flvtool2 mencoder software file conversion you can follow
http://reazulk.wordpress.com/2008/01/24/easy-way-to-convert-a-no-flash-movie-to-flash/
1 comment February 15, 2008
Tiny_mce ibrowser setting
Sometime tiny_mce plugins ibrowser does not work properly in live server. Common cause is for wrong ibrowser settings like path settings and chmod 777 or 755 change
I want to write some settings for tiny_mce ibrowser it will help everyone who trying to use ibrowser in tiny_mce.
Option :
1) if you are working with php 4.x.x in your local machine and your ibrowser are working nice
when you upload it in live project and you server contain php 5.x.x then you must have to change the ibrowser
tiny_mce/plugins/ibrowser/scripts/phpThumb folder from
http://phpthumb.sourceforge.net
2) if your local machine with php 5.x.x and ibrowser working nice it is not required to change in live server.
Configuration :
1) set ibrowser in tiny_mce/plugins/ibrowser
2) in html document
var root_url = ‘{$BASE_URL}’;
tinyMCE.init({
….
plugins : “ibrowser”,
theme_advanced_buttons3 : “ibrowser”,
….
});
3) in config.inc.php $cfg['thumbs'] = array (
array ( // settings
’size’ => ‘*’,
‘ext’ => ‘*’,
‘crop’ => false,
)
uncomment this above code
set $con['ilibs_dir'] with library default dir
ex : $cfg['ilibs_dir'] = array(‘/ib_image’);
4) in phpthumb.class.php no line 75 set
var $config_document_root = “/home/…../public_html”;
5) sometimes some server dis not know $_SERVER['DOCUMENT_ROOT'] and it return null almost
for that reason
in phpthumb.class.php no line 220 set comment and repeace with second line
example :
//$this->config_document_root = (@$_SERVER['DOCUMENT_ROOT'] ? $_SERVER['DOCUMENT_ROOT'] : $this->config_document_root);
$this->config_document_root = ((@$_SERVER['DOCUMENT_ROOT'] && file_exists(@$_SERVER['DOCUMENT_ROOT'] . $_SERVER['PHP_SELF'])) ? $_SERVER['DOCUMENT_ROOT'] : str_replace(dirname(@$_SERVER['PHP_SELF']), ”, str_replace(‘\\’, ‘/’, realpath(‘.’))));
with this all configuration if it does not work properly then ser config_document_root value by force in ResolveFilenameToAbsolute() in phpthumb.class.php line no 976
example :
function ResolveFilenameToAbsolute($filename) {
$this->config_document_root = “/home/…../public_html”;
6) 1. image libraries (chmod 0755 or 0777)
2. ibrowser/scripts/phpThumb/cache (chmod 0755 or 0777)
3. ibrowser/temp (chmod 0755 or 0777)
image libraries which contain all iBrowser uploaded image.
Think now it will work fine!
Add comment February 15, 2008
What is Database Index in MySql?
If in a Database Table there are no index exist like primary or unique key then when you write a query for search anything from this table of course the search time cost will higher then when you use index in this table.
Cause in without index table the search perform must in entire table if in this table huge amount of record exist then you may find it is slow cause entire table searching.
Where if you use column index then searching cost will minimize from previous time cost. Cause when you use index it it will perform the search operation only on indexed row.
Indexed default row
1) primary key field
2) unique key field
Use of Index :
If you use this kinds of query then it is by default search first
$sql = “select *from table where primary_key_id = 40015″;
or
$sql = “select *from table where unique_key_name = ‘Jewel’”;
You can also add another indexed column for searching first
Alter a column which are indexed
$sql = “ALTER TABLE table ADD INDEX (‘lastname’) “;
in this query lastname field are indexed altered.
Now you can write sql for first search like this
$sql=”select * from table where lastname=’Ahmed’”;
this query will faster. Because The use of index.
Reference Site LInk : http://www.databasejournal.com/features/mysql/article.php/1382791
How to index practical image draw are given below Just follow the image.
![]()
Add comment February 13, 2008



