Skip to content
Advertisement

Tag: curl

PHP curl strange behavior PUT vs. POST

One of my projects contains an interface to a web based database, which I call using curl. A curl with -X PUT will create a new record, a curl with -X POST will update an existing record. If I perform this using Advanced REST Client, it works as it should. If I try this using a call of curl_exec out

PHP: CURL fails to save cookie

I am using PHP from one host to connect to the API of another on the same subnet, which requires cookies to remember the login. It gives me a WARNING: failed to save cookies in /var/includes/cookie. I set up a short test script for myself as follows: The verbose log file gives me this output: The contents of $output itself

2ba web API post request with php curl

Im using 2ba its API to receive product information which I later on want to store inside my database. I am trying to create a post request for receiving the data I need. This is the request I want to get to working. And this is my code: postApiData.php index.php My API key does for sure work since I have

Check proxy before cURL

I need to check whether the selected $proxy is active or not and do a loop until a working one in proxy.txt is found before using it in a cURL. How could I do that? Below is a given proxy function. Thank you. Answer maybe you can ping, something like this

Extract links from a list of urls

I am trying to extract all the links from a set list of or urls in a text file and save the extracted links in another text file. I am trying to use the script below which was originally meant to extract Emails: I changed the the email extract part to extract links like this: Here is the full code:

API working well on POSTMAN but giving error in Curl PHP

I am trying to fetch the record from the api. It’s working correctly on postman but giving the error when I use curl in php. Here is my PHP Code: Here is the error I am getting after curl: error after curl option On the Postman it’s giving the result perfect as expected: postman result Furthermore api url working perfect

Refreshing Instagram long-lived access token works in browser (http) but not PHP (curl)

hope you can help. I’m trying to implement Instagram’s Basic Display API but unfortunately I’m running into problems generating a long-lived access token or refreshing an existing long-lived token using PHP/cURL. It seems I’m far from the only one having this or similar issues. I followed Facebooks getting-started guide (located here) and was able to generate a short-lived access token,

Advertisement