I’m using this code to get a token from Spotify’s Web API: That results in this showing up in the browser: Great! But how do I extract “{token}” from the response and use it as a parameter in a request to the API? For example in the request to https://api.spotify.com/v1/users/{user_id}/playlists which needs the token in the header field. Thanks! Answer
Tag: curl
curl: (26) couldn’t open file
I am getting this error, when I am trying to call a box api through curl. curl: (26) couldn’t open file Can’t find why! I am calling this api with a correct file name- curl https://upload.view-api….
Pinterest login with PHP and cURL not working
I have been trying to make cURL login into pinterest.com for the last 17 hours straight, have tried countless and countless different ways just with cURL but it does not work at all. My current code only goes to the page but the data is not posted, so it does not login just takes me to the login page. This
PHP ignoring curl.cainfo setting in php.ini (apparently)
I’m trying to fix a php_curl call on a Windows server (running IIS) that is returning the familiar error “SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed”. As detailed in many related questions here, I downloaded http://curl.haxx.se/ca/cacert.pem, moved it to my server’s hard drive, and added the curl.cainfo setting to my php.ini: Nothing,
How to solve cUrl corrupting file during download
I really, really need help as to how to solve this issue I’m having: Using script:
Curl error 60, SSL certificate issue: self signed certificate in certificate chain
I try to send curl request with my correct APP_ID, APP_SECRET etc. to the I need to get access_token from it, but get a FALSE and curl_error() print next message otherwise: My code is: When I move manually to the link above, I get access_token well. Why it doesn’t work with curl? Help, please. Answer Answers suggesting to disable CURLOPT_SSL_VERIFYPEER
PHP cURL error code 60
Whilst trying to setup a php environment on windows (using wamp) to use the Amazon PHP SDK, when i try to run a sample test I get the following error: I have already added the following line to my php.ini which is the location of a certificate i created using this VBS script VBS-Script I have restarted my WAMP service
get the last redirected url in curl php
Hi I know its a very common topic on StackOverFlow. I have already spent my entire week to search it out. I have a url : abc.com/default.asp?strSearch=19875379 this further redirect to this url: abc.com/default.asp?catid={170D4F36-39F9-4C48-88EB-CFC8DDF1F531}&details_type=1&itemid={49F6A281-8735-4B74-A170-B6110AF6CC2D} I have made my effort to get the final url in my php code using Curl but can’t make it. here is my code: it gives
invalid header error on sending a request with curl
here is my code i keep getting Answer You are surprisingly getting the error Because you use an invalid header name 🙂 You use Notice the space in the header name The correct usage would be:
How return http_code 401 with PHP
I’m using cUrl in the client side. On my webservice (ws.php), i’ve this simple code : When i call this ws.php page, i still have http_code = 200. Here is my cUrl code is client side : $code = 200 even i put the header code “401”. Answer try this on your ws.php: Let me know if this works or