...

View Full Version : Things appearing where they shouldnt be



millsi80
12-05-2008, 04:21 AM
Hi!

I have videos that are being drawn from a db file and displayed on my site via a page called video.php. In this page, I have specified that if the db file entry that video.php is looking says mega then it shows a certain vid. If it has .flv, it shows a different one. If it has vureel, it shows a different one.

Anyway, the problem is that whenever a page loads that has mega specified, it loads the coresponding video ok, but it also tries to load another vid on the same page like it has .flv. This only happens with the mega videos, not with flvs or vureel vids.

It is kind of hard to explain, you can see what the problem is here (http://housemdvideos.com/seasons/video.php?s=01&e=01)

Here is the block of code that does the video stuff:


if(strstr($line,"mega")) {
echo"
<object width=\"400\" height=\"300\"><param name=\"movie\" value=\"$part1\"></param><param name=\"allowFullScreen\" value=\"true\"></param><embed src=\"$part1\" type=\"application/x-shockwave-flash\" allowfullscreen=\"true\" width=\"400\" height=\"300\"></embed></object>
";
}

if(strstr($line,"vureel")) {
echo"
<iframe style='overflow: hidden; border: 0; width: 550px; height: 410px' src=\"$part1\" scrolling='yes'></iframe>
";
}

if (strstr($line,".flv")) {
echo"
<a
href=\"$part1\"
style=\"display:block;width:400px;height:300px\"
id=\"player\"><img src=\"housemd.jpg\"/>
</a>

<script language=\"JavaScript\">
flowplayer(\"player\", \"http://www.housemdvideos.com/flowplayer/flowplayer-3.0.0-rc3.swf\");
</script>
";
}
}


I am fairly new at mysql, so any help would be appreciated!

Thanks so much!

mlseim
12-05-2008, 02:23 PM
I'm thinking that some of the strings that contain the word "mega" also
contain ".flv". So try changing this line:

if (strstr($line,".flv")) {

to this ...

if (strstr($line,".flv") && !strstr($line,"mega")) {

===============

I've also been following the comments on your site about MegaVideos ...
It's a tough one because of their viewing time limit. I would only
guess that vureel and others will be following the same guidelines eventually.

It's like you have to keep one step ahead of them all the time.


EDIT:
And you're not using MySQL ... this is really just a PHP question.


.

millsi80
12-08-2008, 03:26 AM
Thanks, it worked!




EDIT:
And you're not using MySQL ... this is really just a PHP question.





My bad :o



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum