Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jun 2008
    Posts
    93
    Thanks
    12
    Thanked 1 Time in 1 Post

    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.

  • #2
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,509
    Thanks
    8
    Thanked 1,090 Times in 1,081 Posts
    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.


    .

  • Users who have thanked mlseim for this post:

    millsi80 (12-08-2008)

  • #3
    New Coder
    Join Date
    Jun 2008
    Posts
    93
    Thanks
    12
    Thanked 1 Time in 1 Post
    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


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •