+ Reply to Thread
Results 1 to 5 of 5

Thread: MyTube Script Problem.

  1. #1
    Newbie tubememory is an unknown quantity at this point
    Join Date
    Jun 2009
    Posts
    5

    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 07:27 AM.

  2. #2
    Administrator Jordan is a name known to all Jordan is a name known to all Jordan is a name known to all Jordan is a name known to all Jordan is a name known to all Jordan is a name known to all Jordan's Avatar
    Join Date
    Nov 2005
    Location
    Hendersonville, NC
    Posts
    24,556
    Blog Entries
    97

    Re: MyTube Script Problem.

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

  3. #3
    Newbie tubememory is an unknown quantity at this point
    Join Date
    Jun 2009
    Posts
    5

    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 07:27 AM. Reason: URL

  4. #4
    Administrator Jordan is a name known to all Jordan is a name known to all Jordan is a name known to all Jordan is a name known to all Jordan is a name known to all Jordan is a name known to all Jordan's Avatar
    Join Date
    Nov 2005
    Location
    Hendersonville, NC
    Posts
    24,556
    Blog Entries
    97

    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.

  5. #5
    Newbie tubememory is an unknown quantity at this point
    Join Date
    Jun 2009
    Posts
    5

    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 07:28 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

     

Similar Threads

  1. [Win7] Problem Steps Recorder
    By Termana in forum Tutorials
    Replies: 1
    Last Post: 04-14-2009, 09:24 AM
  2. I need help with an script
    By midnightrose2008 in forum PHP Forum
    Replies: 2
    Last Post: 11-11-2008, 04:38 PM
  3. Help with custom rank script.
    By djkee in forum PHP Forum
    Replies: 7
    Last Post: 10-17-2008, 06:47 AM
  4. PHP: New Calculator script
    By Brandon W in forum Classes and Code Snippets
    Replies: 28
    Last Post: 10-08-2008, 03:15 PM
  5. how update an old php script
    By midnightrose2008 in forum PHP Forum
    Replies: 1
    Last Post: 07-07-2008, 09:39 PM

Bookmarks

Bookmarks

     
        Algorithms and Data Structures

        Java tutorials

        Algorithms Forum

Posting Permissions

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