Reputation: 1966
Below link displays a single cell value (1,250.21) from a Microsoft Excel sheet hosted at my OneDrive:
or
Now, I tries fetching this URL via standard cUrl, but got a lot of JavaScript & standard HTML only, nowhere on the whole page there was this value mentioned.
Is there any way to fetch this value(1,250.21)?
Upvotes: 0
Views: 432
Reputation: 1584
Fetching this URL using cURL gives a different result from getting it through the browser, maybe the site checks for some cookie , session variable or even the user agent to determine if it's an automated request. Maybe you'll have to add some extra param to your cURL request in order to get the whole document. Take a look at curl_setopt
Once you've done that, you'll simply have to parse the document and find this element:
I guess you'll have to parse the HTML fetched by cURL and look for this element which holds the value you want:
<div originalhorizontalalignment="3" class="cv-nwr" style="width:66px;max-height:16px;text-align:right;font:bold 10pt Calibri,'Segoe UI',Thonburi,Arial,Verdana,Sans-Serif;" title="1,250.21">1,250.21</div>
Upvotes: 1