Please help with php coding problem

Posted by registercheaper, 03-06-2010, 01:43 AM
I have the following code for a video site. I need to have .mp4 file extension videos play in the same player is the .flv videos extension but I don't know how to edit this code below to resolve my problem. //print_r($a);exit; if(substr($a[url],-4,1)=='.') if(substr($a[url],-4,4)=='.flv') $not_flash_video=0; else $not_flash_video=1; elseif(is_numeric($a[url])) { $yahoo = true; $not_flash_video=1; } else $not_flash_video=0; ### use microsoft player if (preg_match('~rstp~i', $a[url], $match)) { $not_flash_video = true; } //echo "not_flash_video=".$not_flash_video;exit; //echo "$a[url]=".substr($a[url],-4,4);exit; $flashplayer=2; if($not_flash_video) { if ($yahoo === true) Can anyone help Thanks

Posted by SunShellHosting, 03-06-2010, 02:04 AM
Hello Your haven't posted the codes completely or it is in a bad shape so that I can understand it. Can you describe what does that variable meant ? or for what purpose they are used ?

Posted by registercheaper, 03-06-2010, 02:28 AM
Sorry. You can see the full code here http://corbilla.com/song.txt

Posted by Evzin, 03-06-2010, 11:13 AM
Try to replace '.flv' with '.mp4' in line 3

Posted by registercheaper, 03-06-2010, 02:21 PM
Thanks for your replay. If I replace line 3 with .mp4 the .flv files a have on my server will not play. I would like to have both extensions using the same player. Thanks for your help

Posted by Steve_Arm, 03-06-2010, 02:24 PM
Line 3 from above change to if(substr($a[url],-4,4)=='.flv' || substr($a[url],-4,4)=='.mp4')

Posted by Evzin, 03-06-2010, 02:25 PM
to have both extentions u could use OR condition there edit: Steve Arm was faster

Posted by registercheaper, 03-06-2010, 02:33 PM
Thats what I was looking for...Thanks alot to all!

Was this answer helpful?

 Print this Article

Also Read

Custom stamp/engraving tool for PHP

Posted by alias3729, 02-09-2011, 07:32 PMWondering if there's something similar to the websites...

Transparent Reselling . . . ?

Posted by Piano, 08-23-2002, 01:53 PMHow much annoniminity can a reseller have? And what things...

what does this dns report mean?

Posted by gg2327, 09-13-2007, 10:41 PMFAILReverse DNS entries for MX recordsERROR: The IP of one...

Ioncube on server?

Posted by vito, 01-11-2008, 03:42 PMWhat command line entry do I use to find out if I have...

need help grouping a array

Posted by smarty-boots, 10-24-2012, 10:57 AMHi I have this as a array: and I need to group...