Urgent help required. Wierd error.

Discussion in 'Programming' started by sjsjsj215, Oct 11, 2008.

  1. #1
    hello,

    i sudddenly started recieveing this error on my website rea*rest.com a few days back.
    its a youtube video download script. PHP.

    Warning: ereg() [function.ereg]: REG_EMPTY in /mounted-storage/home86c/sub004/sc47367-PVGT/rea*rest.com/php/getURL.php on line 10


    Some correction here, line 10:
    if (ereg($matches[1], $_GET['url']))

    can anybody help regarding this?

    i checked the file and stuff seems fine.
     
    sjsjsj215, Oct 11, 2008 IP
  2. Ueland

    Ueland Peon

    Messages:
    66
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    one of the variables are empty, if you dont want any noice about it, change it too:

    if (@ereg($matches[1], $_GET['url']))
     
    Ueland, Oct 11, 2008 IP
  3. sjsjsj215

    sjsjsj215 Well-Known Member

    Messages:
    1,067
    Likes Received:
    57
    Best Answers:
    0
    Trophy Points:
    150
    #3
    i tried this, it snot giving error, but still its not downloading.
    can you fix it?
     
    sjsjsj215, Oct 11, 2008 IP
  4. Bohra

    Bohra Prominent Member

    Messages:
    12,573
    Likes Received:
    537
    Best Answers:
    0
    Trophy Points:
    310
    #4
    Post the full code
     
    Bohra, Oct 11, 2008 IP
  5. sjsjsj215

    sjsjsj215 Well-Known Member

    Messages:
    1,067
    Likes Received:
    57
    Best Answers:
    0
    Trophy Points:
    150
    #5
    <?php

    if (isset($_GET{'url'})){
    $url=$_GET{'url'};
    $url=trim($url);

    if (strstr($_GET['url'],"youtube.com")){
    $data = @file_get_contents($_GET['url']);
    @preg_match('#/watch_fullscreen\?video_id=([a-z0-9-_]+)&l=([0-9]+)&t=([a-z0-9-_]+)#i', $data, $matches);
    if (@ereg($matches[1], $_GET['url'])) {
    Header("Location: http://www.youtube.com/get_video?video_id=$matches[1]&l=$matches[2]&t=$matches[3]");
    }
    }
    ?>
     
    sjsjsj215, Oct 11, 2008 IP
  6. sjsjsj215

    sjsjsj215 Well-Known Member

    Messages:
    1,067
    Likes Received:
    57
    Best Answers:
    0
    Trophy Points:
    150
    #6
    i'll pay whoever can fix it....
     
    sjsjsj215, Oct 13, 2008 IP