When I try the url for API endpoint directly in browser, it works and returns XML data, but when I try with cURL, it returns 01 – Unavailable service error, so the issue must be with my cURL code. PHP: Direct URL that works and returns XML data: Answer Rather than trying to send the url parameters within the headers
Tag: api
PHP – Tunneling the API
I don’t know what this method called : Reverse Proxy , Tunneling, Bypassing ? Imagine, we have 3 website : 1. I bought the API or Payment Gateway service for example1.com , the website don’t have any content , forms, data. (Just to get the API) 2. Now, I want create tunnel between example2.com | example1.com | exampleapi.com. I mean,
Get all products matching an attribute through WooCommerce API
I would like to find a way to get all the products that match an attribute brand = 226Ers. For example. I am using the automattic/woocommerce package. I have tried a thousand ways but none of them work. I have looked at the documentation and checked the internet but I can’t find the way to do it. Here is an
“myMap is not a function” error when using the Google Maps API
I know this has been asked before. But the situation is that I’m referring the function before loading the map api. This was working a few days ago, and started giving me this error out of nowhere. I’d be grateful if someone could help me. Error: Answer Well, I solved it. The problem had nothing to do with Google Maps
How to loop through CURLOPT_POSTFIELDS data with multiple id’s PHP
I have an order that has multiple line items (in particular 15) and I am trying to loop through id’s with params What am I missing here?: the out put looks like this: but it needs to be like this for each line item: here is the CURL for a single id: here is the CURL i’ve tried for multiples
laravel8 sanctum “Unauthenticated” when access any route under “auth:sanctum” middleware in server
I’m using sanctum for api, and all api run fine in localhost, but when run api in live server token doesn’t work, any route under “auth:sanctum” middleware redirect me to “Unauthenticated”, although i loged in, it loged in successfully and generate token, I passed “token” of the user in postman header, although it works fine in localhost, I tried alot
Http failure response for https://localhost/***/api/get**.php?TOKEN=???: 0 Unknown Error
I’m working on a new app for my businnes and I need to convert my php web app to a mobile app. I’m having issues while trying to get the json data from my php file which is : I’ve been testing httpclient in my ts file with https://jsonplaceholder.typicode.com/todos/1 and it was working. Here is my ts file: On the
PHP – Best way to get meta data from comments
PHP has a function called get_meta_tags which can read meta tags of HTML files. However, as far as I know there is no standard way to define meta tags for PHP files. The de facto solution seems to be to add comment to the top of the file like so: Is there any way to read these “meta tags” with
How to visit an array indexed by indexed in php / Laravel?
I got an API response like [“at123@gmail.com”,”adhd5@gmail.com”,”adahsad5@gmail.com”] I got this array in a request variable $request->optional_email I am trying to access data by a loop like below: But it doesn’t work. How can I solve it? Answer As the $request->optional_email is just a list you do not need to use the $key variable in the foreach. Instead you should just
what is nonce in the api client
I have a API client to make a PHP call. But as a matter of fact the documentation given with the API is very limited, so I don’t really know how to use it. This a part of the API code: I don’t know what is nonce and how does it works. Answer The NIST glossary defines a nonce as