Skip to content
Advertisement

Tag: api

cURL to get XML response from an API not working

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

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,

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

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

Advertisement