Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8313817
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T20:37:19+00:00 2026-06-08T20:37:19+00:00

I am using the excellent Parse as a data store, but need to access

  • 0

I am using the excellent Parse as a data store, but need to access it through PHP (as a perhaps irrelevant bit of detail – I am having to access it through PHP in order for Facebook scrapers to recognise dynaically generated tags on my page).

Parse have a Rest API, and basic instructions on how to use them. For example, to retrieve an object:

curl -X GET \
-H “X-Parse-Application-Id: [My application ID]” \
-H “X-Parse-REST-API-Key: [My Parse Rest API key]” \
https://api.parse.com/1/classes/moods/

Unfortunately, I have no idea how to integrate this with PHP Curl examples I’ve seen online. I gather:

curl_setopt($ch, CURLOPT_USERPWD,

..might be involved. As might:

curl_setopt($ch, CURLOPT_URL, $Url);

but I could be way off. I am really sorry to not be able to figure this out myself – but I think this is still a valid question as it is very confusing to those who haven’t used Curl/PHP before. Basically – I’m looking for information as basic as where to put the quoted example from the Parse docs…

Thanks in advance

EDIT:

Hey all, here is the solution as I configured it. Thanks to debianek for getting me going in the right direction.

if ($_GET['id']) {
$imageId = $_GET['id']; 
MyApplicationId = '[ID]';
$MyParseRestAPIKey = '[API Key]';
$url = 'https://api.parse.com/1/classes/images/'.$imageId;

$headers = array(
    "Content-Type: application/json",
    "X-Parse-Application-Id: " . $MyApplicationId,
    "X-Parse-REST-API-Key: " . $MyParseRestAPIKey
);

    $handle = curl_init(); 
curl_setopt($handle, CURLOPT_URL, $url);
curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);
curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);

    $data = curl_exec($handle);
curl_close($handle);

$array = json_decode($data);

$title =  $array->title;            

..and so on. Hope that helps.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T20:37:20+00:00Added an answer on June 8, 2026 at 8:37 pm

    Put it into headers

    $headers = array(
        "X-Parse-Application-Id: $MyApplicationId",
        "X-Parse-REST-API-Key: $MyParseRestAPIkey"
    );
    
    $handle = curl_init(); 
    curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

After using the excellent Krumo package for PHP (perhaps most famous for its use
I'm new using the excellent stuff of css twitter bootstrap and having a problem,
So I'm using the excellent Ancestry gem But while the documentation seems very complete
I am using the excellent jTemplates plugin to generate content. Given a data object
I'm using the excellent validate CFC by Ryan J. Heldt http://validation.riaforge.org/ but have a
I am using the excellent jQuery coverflow plugin ContentFlow but I have a problem
I'm sure this is simple but I'm banging my head! I'm using the excellent
I need to tweak a jQuery carousel I have made using the excellent cycle
Am using the excellent FileHelpers library to parse a number of different files. One
I'm using the excellent (but large) DateJS library to handle dates and times in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.