-2
I have the following API: https://proxycheck.io/v2/42.131.121.100?vpn=1&asn=1
{
"status": "ok",
"42.131.121.100": {
"continent": "Asia",
"country": "China",
"isocode": "CN",
"latitude": 34.7732,
"longitude": 113.722,
"proxy": "no",
"type": "Business"
}
}
How do I access only what is in "country" and "type" and put in a variable?
will always be like this? this layout changes at some point, or this search api changes the parameters?
– novic
always so, the layout will always be the same
– yMF
as the same values, for example
42.131.121.100
will always be that number?– novic
This value will change according to what is passed in the API link, but for example we can take into account a fixed value in this IP always.
– yMF
You have to write a code that fits in several aspects. complicated until you answer
– novic
I don’t know if it helps, but in Python it would look like this: https://answall.com/questions/486831/acessar-values-de-um-json-em-python I need to do the same thing, only in PHP
– yMF