Skip to content
Advertisement

Tag: curl

Guzzle returns cURL error 3: malformed

I want to try out the guzzle library and am following through their quickstart tutorial to make http requests to an api. Yet it doesn’t seem to work, because I get the following error: Since I have never worked with cURL before, I don’t even know how to respond to that error message. Here is my code with the request

PHP Built-In Server Can’t cURL

I have a relatively simple script like the following: When I execute it on the command line, it works – I get the meager results from within test.html. When I run this script by loading up the built-in PHP server and browsing to the script, it hangs. No output to the screen, nothing written to the logs. I read that

PHP cURL: CURLOPT_CONNECTTIMEOUT vs CURLOPT_TIMEOUT

PHP has these two options related to timeout: CURLOPT_CONNECTTIMEOUT and CURLOPT_TIMEOUT. The descriptions on the PHP site are a bit vague. What’s the difference? To use a real world example: say you’re sending GET vars to a URL via cURL and you want to receive a XML back, would CURLOPT_CONNECTTIMEOUT relate to the maximum amount of time it can take

cURL redirect request to amazon s3 returns 400 code

Using PHP curl to fetch a release tag file from github. Github responds with a redirect header to S3 which cURL does follow. For example: Results in a 302 with a location header to s3 with various authentication details Following the redirect location header, Amazon responds with 400 Request specific response headers cannot be used for anonymous GET requests. As

Advertisement