Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-05-2008, 03:21 AM   PM User | #1
millsi80
New Coder

 
Join Date: Jun 2008
Posts: 93
Thanks: 12
Thanked 1 Time in 1 Post
millsi80 is an unknown quantity at this point
Things appearing where they shouldnt be

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

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

Code:
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!

Last edited by millsi80; 12-05-2008 at 03:25 AM..
millsi80 is offline   Reply With Quote
Old 12-05-2008, 01:23 PM   PM User | #2
mlseim
Master Coder

 
mlseim's Avatar
 
Join Date: Jun 2003
Location: Cottage Grove, Minnesota
Posts: 9,055
Thanks: 8
Thanked 1,032 Times in 1,023 Posts
mlseim has a spectacular aura aboutmlseim has a spectacular aura aboutmlseim has a spectacular aura about
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.


.
mlseim is offline   Reply With Quote
Users who have thanked mlseim for this post:
millsi80 (12-08-2008)
Old 12-08-2008, 02:26 AM   PM User | #3
millsi80
New Coder

 
Join Date: Jun 2008
Posts: 93
Thanks: 12
Thanked 1 Time in 1 Post
millsi80 is an unknown quantity at this point
Thanks, it worked!

Quote:
Originally Posted by mlseim;756913I'

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


My bad
millsi80 is offline   Reply With Quote
Reply

Bookmarks

Tags
mysql, php, video

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:44 AM.


Advertisement
Log in to turn off these ads.