Skip to content

Tag: curl

why is curl waiting for a keypress?

I simply want to run the following command: It seems to connect just fine, but it hangs waiting for a keypress. How can I automatize this in a script? EDIT: I have absolutely no idea but it solved by erasing the — part of the URL. Can someone explain to me why? Answer In bash, you must use quotes (single

How do I translate a PHP cURL request to python

I’m coding a tool to get Whois info, and I need to use the WHMCS API for it. This is the code they provide: I want to use this request without PHP, and inside Python. What library should I use and how do I set the variables in the payload?(php or python-style?) Answer What library should I use requests is

Convert string to javascript array calling AJAX php curl call

How do I convert this result to a javascript array? HTTP/1.1 200 OK Date: Sat, 02 Oct 2021 09:19:28 GMT Content-Type: application/json Content-Length: 796 Connection: keep-alive { “refresh_token_expires_in” : “7779999”, “refresh_token_status” : “approved”, “api_product_list” : “[trustpilot-client-api, public_data]”, “app_enduser” : “APIID”, “api_product_list_json” : [ “trustpilot-client-api”, “public_data” ], “organization_name” : “trustpilot”, “” : “”, “token_type” : “BearerToken”, “issued_at” : “1633166368319”, “client_id” :

cURL contains an invalid cURL option

I was upgrading from PHP 7.4 to PHP 8 and suddenly this errors appears in my cURL request: I use the following code to build the curl: The targeted file is always an php extensions. ‘buildPostFields’ returns an array of the data. Probably this errors accours because of my php upgrade to version 8, but I cannot find any hints

jwt token not found when i pass in username and password in curl

I want to use jwt token in my symfony project. But i have a problem because when i use: curl.exe -X POST -H “Content-Type: application/json” http://localhost:81/api/login_check -d ‘{“username”: “”,”password”:”000000″}’ I get : {“code”:401,”message”:”JWT Token not found”} This is my security.yml: As you can see i use the lexikJWTAthenticationBundle. I made a private key and public key with ssl. I use

I cannot echo the first index of a PHP cURL response

I’m using this little PHP function that I wrote to make calls to my master database: On register.php I use the following to respond: My problem comes when trying to retrieve the first index of any given response. I can use var_dump($information) and will receive array(3) { [“test1”]=> string(6) “value1” [“test2”]=> string(6) “value2” [“test3”]=> string(6) “value3” }. However, when I

PHP cURL post data is not sent to target url

Maybe it’s duplicate question. I have tried any solution with similar question with mine that I can find and implemented it to my probs, not a single solution is work. I need to use PHP curl to get data from other systems (B). But in the B the data I sent is not defined or no data was sent. curl

Cant echo anything after cURL in PHP

I have a curl that works fine. The file where the cURL is placed is a PHP file, executed by .ajax I am echoing an $apikey at the end of the PHP file, without the cURL script. it prints correctly. …