Relative Content

Tag Archive for phpcurl

PHP CURL would not retrieve table content

I am trying to scrawl table content from a webpage from canada.ca. It seems that the retrieved content is missing certain parts, as described in the following code:

Why does this cURL request redirect?

When I request data from https://fda.gov using a browser, or using curl in terminal/command prompt the site is returned as expected. When using curl in PHP the site redirects to an excessive-requests-apology.html and returns a excessive requests apology and not found page.

php cURL handle timeout

I have a cURL call where I know the URL has been timing out (I get a 504 gateway timeout when I put the URL in my browser). I would like to handle this and present the user with a descriptive error, rather than just the 500 server error they are encountering currently.