Closed Thread
Results 1 to 5 of 5

Thread: MyTube Script Problem.

  1. #1
    tubememory is offline Newbie
    Join Date
    Jun 2009
    Posts
    5
    Rep Power
    0

    MyTube Script Problem.

    I downloaded MyTube script from <URL REMOVED> and installed it on my site <URL REMOVED>

    That script can search and download youtube videos.

    Now I have a problem, when I enter a search query with more than one word (eg: Red Rose) it gives an error, see >> <URL REMOVED>

    But if I enter single query (single word) >> "Rose" >> <URL REMOVED> it woking fine.

    Why is that ? can anyone help me to fix this problem, you can download that simple script from <URL REMOVED>
    Last edited by Jordan; 07-07-2009 at 05:27 AM.

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Jordan Guest

    Re: MyTube Script Problem.

    You'll have to provide us with the code. Especially the code on and around line 20 of base.php.

  4. #3
    tubememory is offline Newbie
    Join Date
    Jun 2009
    Posts
    5
    Rep Power
    0

    Re: MyTube Script Problem.

    As i'm new to this forum, forum doesnot allow me to post links.
    You can get the PHP code of "base.php" via below URL (As a txt file).

    Pls delete unneccessary spaces in the below URL.

    <URL REMOVED>
    Last edited by Jordan; 07-07-2009 at 05:27 AM. Reason: URL

  5. #4
    Jordan Guest

    Re: MyTube Script Problem.

    The first thing you should do is change error_reporting(0) to error_reporting(E_ALL) while debugging this script. I wrote a tutorial on debugging with PHP here, if you are interested.

    Secondly, the code throwing the error is here:

    Code:
        $ytdata fetchrss("http://gdata.youtube.com/feeds/videos?vq=$ytsearch&start-index=1&max-results=50");
        if(!(
    xml_parse($ytxml_parser$ytdata)))
            die(
    "Error on line " xml_get_current_line_number($ytxml_parser)); 
    I suspect it is something to do with the $ytsearch variable. It may have something to do with your formatting:

    Code:
    $searchterms addslashes(trim(str_replace(" ","+",$_GET['search'])));
    $searchterms addslashes(trim(str_replace("-","+",$_GET['search'])));
    $searchterms2 ucwords(str_replace("+"," ",$searchterms)); 
    You should echo out $ytsearch before you use it to build the URL string and see what it looks like. Or better, echo the URL string out and see if you can access it in your browser.

  6. #5
    tubememory is offline Newbie
    Join Date
    Jun 2009
    Posts
    5
    Rep Power
    0

    Re: MyTube Script Problem.

    Thank you for replying, but i'm not a hard coder.

    if you can pls download the original source code given below and fix the problem and tell it to me, and it has only few PHP file No Database required, only few PHP files.

    Here is the download location of my original source code:

    <URL REMOVED>
    Last edited by Jordan; 07-07-2009 at 05:28 AM.

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Im having problem with a login script
    By doingit08 in forum PHP Development
    Replies: 3
    Last Post: 10-26-2010, 01:30 PM
  2. A Shell script problem
    By veda87 in forum Linux Programming and Scripting
    Replies: 2
    Last Post: 08-18-2010, 07:51 PM
  3. Java script injection problem
    By rabin in forum JavaScript and CSS
    Replies: 2
    Last Post: 04-11-2010, 06:44 PM
  4. Shell script string operator problem
    By DarkLordoftheMonkeys in forum Linux Programming and Scripting
    Replies: 2
    Last Post: 11-12-2009, 01:32 PM
  5. [php][mysql]Problem with a session script
    By 222333 in forum PHP Development
    Replies: 1
    Last Post: 12-30-2007, 11:07 AM

Tags for this Thread

Bookmarks

Posting Permissions

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