Need help if possible

Discussion in 'PHP' started by stephen4800, Jul 16, 2012.

  1. #1
    Need a good coder to help me with an error.

    My users use the site www.fantrafftic.com to exchange likes on Youtube. Once the click Like to API confirms from YouTube to my site and gives the users points. Some users are complaining about liking and its telling them they have not.

    Here is the error log :

    [16-Jul-2012 14:12:59] PHP Warning: get_likes() [<a href='function.get-likes'>function.get-likes</a>]: Node no longer exists in /home/wwwfantr/public_html/system/modules/ylike/process.php on line 11
    [16-Jul-2012 14:12:59] PHP Warning: get_likes() [<a href='function.get-likes'>function.get-likes</a>]: Node no longer exists in /home/wwwfantr/public_html/system/modules/ylike/process.php on line 11
    [16-Jul-2012 14:13:09] PHP Warning: get_likes() [<a href='function.get-likes'>function.get-likes</a>]: Node no longer exists in /home/wwwfantr/public_html/system/modules/ylike/process.php on line 11



    Here are the 1st 16 lines of process.php

    <?
    define('BASEPATH', true);
    require_once('../../config.php');
    if(!$is_online){exit;}

    function get_likes($url){
    $url = get_data('http://gdata.youtube.com/feeds/api/videos/' . $url . '?v=2');
    $entry = new SimpleXMLElement($url);
    $yt = $entry->children('http://gdata.youtube.com/schemas/2007');
    $attrs = $yt->rating->attributes();
    return $attrs['numLikes'];
    }

    if(isset($_GET['get']) && $_GET['id'] != ''){
    $content = $_GET['id'];
    echo get_likes($content);
    }elseif(isset($_GET['step']) && $_GET['step'] == "skip"){






    Can anyone help me?
     
    stephen4800, Jul 16, 2012 IP
  2. pHrEaK

    pHrEaK Active Member

    Messages:
    147
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #2
    This may or may not be causing your problem, but it seems your missing a " in this line:

    if(isset($_GET['get']) && $_GET['id'] != ''){

    should be(if I'm not mistaken):

    if(isset($_GET['get']) && $_GET['id'] != ''"){


    if that doesn't take care of it you may also try
    if((isset($_GET['get'])) && ($_GET['id'] != ''")){

    just a couple things I would try
     
    pHrEaK, Jul 18, 2012 IP
  3. pHrEaK

    pHrEaK Active Member

    Messages:
    147
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #3
    seems as if I may have mistaken two apostrophes for one quotation mark...hmmm
     
    pHrEaK, Jul 19, 2012 IP