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 7980661
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T10:08:37+00:00 2026-06-04T10:08:37+00:00

I am trying to use Crocodoc api with the following code to get the

  • 0

I am trying to use Crocodoc api with the following code to get the status.

$croco = new Crocodoc();

$uuids = "786e072b-981c-4d2a-8e80-80e215f1f7c2";
echo "\n\nchecking status of : ", $uuids;
$status = $croco->getStatus($uuids);
echo "\n\nstatus is : ", $status;

class Crocodoc { 
    public $api_key = 'HPUd6LZXg5174TAENbvBcx30';
    public $api_url = 'https://crocodoc.com/api/v2/';

    public function getStatus($uuids){
        $url = $this->api_url.'document/status';
        $token = $this->api_key;
        $dataStr = '?token='.$token.'&uuids='.$uuids;
        // this is a GET request
        $output = $this->doCurlGet($url, $dataStr);
        return $output;
    }
}

I don’t get the status and no error. What is wrong or it does not work in evaluation mode. Right now I am using it local with XAMPP, can that be a problem?

  • 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-04T10:08:39+00:00Added an answer on June 4, 2026 at 10:08 am

    What doCurlGet does?

    Because the request (and response) is fine:

    HTTP/1.1 200 OK
    Server: nginx/1.2.0
    Date: Thu, 24 May 2012 10:11:27 GMT
    Content-Type: application/json
    Transfer-Encoding: chunked
    Connection: keep-alive
    
    [
      {
        "uuid": "786e072b-981c-4d2a-8e80-80e215f1f7c2",
        "viewable": true,
        "status": "DONE"
      }
    ]
    

    You might try with a real curl, like:

    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, "/* generated url to crocodoc */");
    $data = curl_exec($ch);
    curl_close($ch);
    

    Or directly:

    $data = file_get_contents('/* generated url to crocodoc */');
    

    Edit:

    Just tried this code, and it works fine:

    $croco  = new Crocodoc();
    $uuids  = "786e072b-981c-4d2a-8e80-80e215f1f7c2";
    $status = $croco->getStatus($uuids);
    var_dump($status);
    
    class Crocodoc { 
        public $api_key = 'HPUd6LZXg5174TAENbvBcx30';
        public $api_url = 'https://crocodoc.com/api/v2/';
    
        public function getStatus($uuids){
            $url = $this->api_url.'document/status';
            $token = $this->api_key;
            $dataStr = '?token='.$token.'&uuids='.$uuids;
    
            // this is a GET request
            return file_get_contents($url.$dataStr);
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to use this code to connect the AD PrincipalContext context = new PrincipalContext(ContextType.Domain,
I'm trying use this code to get image resolution from file bool GetImageSizeEx(const char
I'm trying use self-signed certificate (c#): X509Certificate2 cert = new X509Certificate2( Server.MapPath(~/App_Data/myhost.pfx), pass); on
I'm trying use mod_rewrite to rewrite URLs from the following: http://www.site.com/one-two-file.php to http://www.site.com/one/two/file.php The
trying to use the preferred on method call but the code is not working
I am trying use the new server side plug-in feature for TFS 2010. (I
Trying to use the getDependentRowset in a ZF application. I have the following relationship
I am relatively new to CMake, and I'm trying use the boost asio library
I was trying use the code shown below to plot in such a way
I am trying use the django ORM to get a list by year of

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.