Skip to content

Tag: curl

How can I access the json returned in PHP by my Web Api?

I am using the following code to send and retrieve data from my Web API this is what I get in response I am trying to access the JSON with the following code (Because it worked for me on a similar request): But as you can see the variable $data stopped being a JSON and became a bool(true). Does anyone

PHP cURL login and loop through URLs stuck on first URL

I am trying to loop through part numbers to get their associated information. If I echo the part number it is always the same. even though the starting part number is correct. Ideas? This outputs… The first one is the only one that is correct. NOTICE WE04X10010 is being echoed as the part number in all …

Send APi key and secret key in CURL

I’m trying to convert the line below to be used with PHP whilst also learning how to use CURL! Bellow is what I have so far, however I keep getting HTTP ERROR 403 UnauthorizedException accessing service error, so I think the key and secret and not being sent correctly. Answer Use this tool as it save so…

cURL shows since few days blank page

i use curl. Since a few days curl show’s me a blankpage. The mainpage /kenteken/ he show’s without problem. But if there is text like /kenteken/TF172H it show’s a blankpage. I hope some one can help. Answer If you go to the URL in your browser with the Developer Console – Network tab o…

php curl reponse not showing

php curl response not showing please help to fix. when I run this code I do not get any response from recharge.php file here is recharge.php file Answer try this code, hope it will help you— your current file — recharge.php and also you should put return/die/exit after echo statement to avoid the …

Add record in ZOHO API

I am trying to add a record (contact) to the ZOHO database using their API after submitting an order. This requires an authorization token with a validity of 60 minutes which I can generate with a grant token, but which I can only generate with user interaction (GET). Is there a way to get a grant token witho…

convert curl post to wp_remote_post

Here is curl code which is working very good But if i try to convert this above code to worpress wp_remote_post i am getting error. here is response i am getting https://pastebin.com/Ap5LpfZb Please let me know where i am doing wrong ? Answer I got it there was problem with the header array i was passing that…

How to list files inside public folder?

I have a persistent volume defined in server under www/public/images/logo/ I want to list all the files inside that folder. So far I have done following lines with no luck. Can anybody please help ? Answer If you are want to list all files on same server then you can use php function scandir(); If you are wan…