Skip to content
Advertisement

Tag: curl

Extract token from response url – Spotify API

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

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….

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,

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

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

Advertisement