Receipt_url and curl

I’m trying to get the contents of of the receipt by using curl and the receipt_url. However, I am not getting the receipt from the curl response I’m getting some HTML code that returns a blank page.
Using my browser and the same receipt_url, the complete receipt is displayed.
Coding in php.
$c = curl_init();
curl_setopt($c, CURLOPT_CONNECTTIMEOUT, 10);
curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
curl_setopt($c, CURLOPT_URL, $receipturl);
$return = curl_exec($c);
curl_close($c);

if I output $return I get the following code:

<!DOCTYPE html><html><head><meta content="width=device-width, initial-scale=1" name="viewport" /><meta content="noindex,nofollow" name="robots" /><meta charset="utf-8" /><title></title><link rel="stylesheet" media="screen" href=["https://d3g64w74of3jgu.cloudfront.net/receipts/assets/application-d5e58bf4f1742c820fff780619a86ab3373b6b4f0f49eb8c5d8b61e7f5750f43.css"](https://d3g64w74of3jgu.cloudfront.net/receipts/assets/application-d5e58bf4f1742c820fff780619a86ab3373b6b4f0f49eb8c5d8b61e7f5750f43.css) /></head><body></body></html>

:wave: Are you trying to get the receipt data from the html that the receipt_url displays? What you have in your example is just the head of the html. If you want the contents of the receipt you’ll need to get it from the table of the body. :slightly_smiling_face:

Appreciate the prompt reply. I went in a different direction to get to the solution I needed. But yes I was hoping to retrieve the entire html ouput from the receipt_url. Maybe it was an issue with my php/curl configuration.

Awesome! Feel free to reach out if you have any additional questions. We’re always happy to help. :slightly_smiling_face: