Log in

View Full Version : Need help with If and End if array



dj30324
02-28-2010, 01:01 PM
Hi guys this is my code below

<?php
if(isset($_GET['link'])){

$url = explode("/",$_GET['link']);
$url = array_filter($url);
echo "<pre>";
print_r($url);
if($url[2]=="www.veoh.com"){
echo "<br>".$viewkey = end($url);
echo "<br>".$viewkey = explode("=",$viewkey);
echo "<br>".$viewkey = end($viewkey);
if(strstr($_GET['link'], 'veoh')){
$file = "veoh" ;
}
}else if($url[1]=="www.zshare.net"){
$viewkey = end($url);
$file = "videmb";
}
else
//(strstr($_GET['link']=="vids.myspace.com", 'ms'));
($url[3]=="www.myspace.com");
{
$viewkey = end($url);
$file = "ms";

}
// echo "<br>".base64_encode($viewkey) ;

//echo "<br>";
//echo " Below is out of code.";
//echo "<br>";
// echo "<br>";
//echo "<br>";
echo $code = '<embed height="400" width="590" wmode="opaque" menu="false" flashvars="file='.base64_encode($viewkey).'.flv&amp;streamer=http://'.$_SERVER['HTTP_HOST'].'/'.$file.'/'.base64_encode($viewkey).'.flv&skin=http://'.$_SERVER['HTTP_HOST'].'/videmb/beelden.zip&plugins=fbit-1&dock=true&amp;autostart=false&amp;menu=false&amp;start=0&amp;type=http&amp;abouttext='.$_SERVER['HTTP_HOST'].'&amp;aboutlink=http://www.'.$_SERVER['HTTP_HOST'].'" allowscriptaccess="always" wmode="transparent" allowfullscreen="true" quality="high" name="player" id="player" style="" src="http://'.$_SERVER['HTTP_HOST'].'/videmb/player2.swf" type="application/x-shockwave-flash"/>';
}
?>

the zshare and veoh works


c.php?link=http://www.zshare.net/video/73079731fd421ccf/
<pre>Array
(
[0] => http:
[2] => www.zshare.net
[3] => video
[4] => 73079731fd421ccf
)
<embed height="400" width="590" wmode="opaque" menu="false" flashvars="file=NzMwNzk3MzFmZDQyMWNjZg==.flv&amp;streamer=http://aol.com/videmb/NzMwNzk3MzFmZDQyMWNjZg==.flv&skin=http://aol.com/videmb/beelden.zip&plugins=fbit-1&dock=true&amp;autostart=false&amp;menu=false&amp;start=0&amp;type=http&amp;abouttext=aol&amp;aboutlink=http://www.aol.c0m" allowscriptaccess="always" wmode="transparent" allowfullscreen="true" quality="high" name="player" id="player" style="" src="videmb/player2.swf" type="application/x-shockwave-flash"/>



fine but i cant get the myspace to work. when i enter

c.php?link=http://vids.myspace.com/index.cfm?fuseaction=vids.individual&videoid=54051946
it becomes like this


Array
(
[0] => http:
[2] => vids.myspace.com
[3] => index.cfm?fuseaction=vids.individual
)
<embed height="400" width="590" wmode="opaque" menu="false" flashvars="file=.flv&amp;streamer=http://aol.com/ms/.flv&skin=http://aol/videmb/beelden.zip&plugins=fbit-1&dock=true&amp;autostart=false&amp;menu=false&amp;start=0&amp;type=http&amp;abouttext=aol.com&amp;aboutlink=http://aol.com" allowscriptaccess="always" wmode="transparent" allowfullscreen="true" quality="high" name="player" id="player" style="" src="http://aol.com/videmb/player.swf" type="application/x-shockwave-flash"/>
nothing is showing . in

.flv&

this 54051946 suppose to be seperated

and then emcrypted base64 then the link will be something like
http://aol.com/ms/NTQwNTE5NDY=.flv

so can any one help me ! need a little bit modify, what am i doing wrong on my code. thanks in advance. oh i also i would like the array to be nt to be displayed, but i did try to use it to get rid the end variable

$viewkey = end($url);
but if i get rid of that then the other zshare veoh end url wont show.