<?php
/**
 * Created by PhpStorm.
 * User: varun_2
 * Date: 02-04-2016
 * Time: 12:14
 */

function createParseUser()
{
    $ch = curl_init() ;
    curl_setopt($ch, CURLOPT_URL, 'https://api.parse.com/1/users');

    curl_setopt($ch, CURLOPT_HEADER, 1);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
    $data = array("username" => "mohan@steelmint.com", "password" => "mohan@steelmint.com");
    $data_string = json_encode($data);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);

    curl_setopt($ch, CURLOPT_HTTPHEADER, array(
        'X-Parse-Application-Id: nYfW5DijG0OJppSCDJIYz4HHt98NISHXU4cQdVlf',
        'X-Parse-REST-API-Key: PGr8zFfzkMlYxJ1bzwH8sPRYdLR5RA4Jde1kAxc6' ,
        'Content-Type: application/json'
    ));

    $data = curl_exec($ch);
    curl_close($ch);
    return $data ;
}