Jump to content


  • Posts

  • Joined

  • Last visited

egcmx's Achievements


Newbie (1/14)



  1. thanks again ben! you saved me for the second time!
  2. yes i'm following a tutorial. when i try to print $json_object or $fb_data it returns a null/blank value.
  3. so here is my code: <?php $page_id = '552721801408793'; $access_token = '558308744244333|TsDvTos1cL4WpQnWxQUdm0_xsTs'; //Get the JSON $json_object = @file_get_contents('https://graph.facebook.com/' . $page_id . '/posts?access_token=' . $access_token); //Interpret data $fbdata = json_decode($json_object); foreach ($fbdata->data as $post) { $posts .= '<p><a href="' . $post->link . '">' . $post->story . '</a></p>'; $posts .= '<p><a href="' . $post->link . '">' . $post->message . '</a></p>'; $posts .= '<p>' . $post->description . '</p>'; $posts .= '<br />'; } ?> it gives me these errors: Notice: Trying to get property of non-object in C:\xampp\htdocs\droga\feed.php on line 10 Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\droga\feed.php on line 10 please help me! thanks!
  4. egcmx

    Help With Sessions

    thanks a lot man! you're a lifesaver!
  5. egcmx

    Help With Sessions

    i got two files, login.php and menu.php. session_register and session_is_registered is no longer available for php 5.4. so i used $_SESSION and isset. but it keeps redirecting to login.php. can someone help me? LOGIN.PHP ---------------- $_SESSION['username']=$username; header("Location:menu.php"); MENU.PHP ---------------- session_start(); if(!isset($_SESSION['username'])) { header("location:login.php"); }
  6. i already fixed it. i need to put the files inside a folder inside xampp/htdocs/ for the php codes to work. thanks by the way!
  7. i'm using xampp. when i open view.php chrome and firefox are displaying this. when i open it on internet explorer it downloads the file. please help me. thanks!
  • Create New...