Advertisement
lenchan139

Untitled

Apr 18th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.88 KB | None | 0 0
  1. <?php
  2. session_start();
  3.           define ('PARSE_SDK_DIR', 'Parse/');
  4.           require_once('Parse/autoload.php');
  5.           use Parse\ParseClient;
  6.           use Parse\ParseObject;
  7.           use Parse\ParseQuery;
  8.           use Parse\ParseACL;
  9.           use Parse\ParsePush;
  10.           use Parse\ParseUser;
  11.           use Parse\ParseInstallation;
  12.           use Parse\ParseException;
  13.           use Parse\ParseAnalytics;
  14.           use Parse\ParseFile;
  15.           use Parse\ParseCloud;
  16. $appid = "appid";
  17. $restkey = "rest api id";
  18. $masterkey = "master key";
  19. ParseClient::initialize( $appid, $restkey, $masterkey);
  20. ParseClient::setServerURL('https://parseapi.back4app.com', '/');
  21.  
  22.  
  23.     //upload
  24.     $fbUserObj = new ParseObject("fbUser");
  25.     $fbUserObj->set("fbUserId",$user->id);
  26.     $fbUserObj->save();
  27.  
  28.     //download
  29.     $q->equalTo("fbUserId", $user->id);
  30.     $r = $q->find();
  31.     if(count($r)>0){
  32.         echo "you are here!";
  33.     }else{
  34.         echo "you are not here!";
  35.     }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement