Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

loginFB.php

By: a guest on May 2nd, 2012  |  syntax: PHP  |  size: 1.15 KB  |  views: 6  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <pre><?php print_r($_SESSION); ?></pre>
  2.     <?php if ($user):
  3. ?>
  4. <a href="<?php echo $logoutUrl;?>"><img id="fb_logout_image" src="http://static.ak.fbcdn.net/images/fbconnect/logout-buttons/logout_medium.gif" alt="Logout Facebook"/></a>
  5. <?php else:?>
  6. <a href="<?php echo $loginUrl;?>"><img id="fb_login_image" src="http://static.ak.fbcdn.net/images/fbconnect/login-buttons/connect_light_medium_short.gif" alt="Login Facebook"/></a>
  7. <?php endif?>
  8.  
  9. <?php }?>
  10.  
  11.  
  12. <img src="https://graph.facebook.com/<?php echo $user;?>/picture?type=large">
  13.                 <?php
  14.  
  15.                 $url = "http://graph.facebook.com/$user/picture?type=large";
  16.                 $sourceFilePath = CurlHelper::downloadFile($url, array('followLocation' => true, 'maxRedirs' => 5, ));
  17.  
  18.                 $theimageinfo = getimagesize($sourceFilePath);
  19.                 $thepp = $_SESSION['USERID'];
  20.  
  21.                 if ($theimageinfo[2] == 1) {
  22.                         $thepp .= ".gif";
  23.                 } elseif ($theimageinfo[2] == 2) {
  24.                         $thepp .= ".jpg";
  25.                 } elseif ($theimageinfo[2] == 3) {
  26.                         $thepp .= ".png";
  27.                 }
  28.  
  29.                 $myvideoimgnew = "/home/entendu/public_html/images/membersprofilepic/" . $thepp;
  30.                
  31.  
  32.                 $thumb = PhpThumbFactory::create($sourceFilePath);
  33.                 $thumb -> save($myvideoimgnew);