skip to Main Content

How I can get specific data from API – PHP

I have this JSON an I want to get just license_key. {"data": {"enabled": true,"product_link": "example","license_key": "BS7X4-55UH7-ZG2EV-ME2N5","buyer_email": "[email protected]","uses": 0,"date": "2022-11-11T20:56:37+00:00"}} I try this script but when i open it I get white page <?php $url = "https://example.com/"; $curl = curl_init($url); curl_setopt($curl,…

VIEW QUESTION

I have this object and I need to remove the repeated rfcs from the catalog, how is it possible to do this? – Laravel

I have this object in php: $object = [ [ {"catalogo": "C400047", "rfc_inf_aval": "CIS981002NK4", }, {"catalogo": "C140064","rfc_inf_aval": "MZT8501014S6",}, {"catalogo": "C400047","rfc_inf_aval": "MZT8501014S6",}, {"catalogo": "C400047","rfc_inf_aval": "CIS981002NK4",}, {"catalogo": "C140064","rfc_inf_aval": "MZT8501014S6",}, {"catalogo": "C140064","rfc_inf_aval": "MZT8501014S6",}, {"catalogo": "C140064","rfc_inf_aval": "MZT8501014S6",}, {"catalogo": "C140064","rfc_inf_aval": "CIS981002NK4",}, ], ] and it…

VIEW QUESTION

Replacing fields in a JSON file with PHP

The bottom line is that I have two JSON files and in one of them there are fields: "string_action_ok": "OK" and "string_action_cancel": "Cancel", but in the other JSON file there is only one field: "string_action_ok": "OK", and the field "string_action_cancel":…

VIEW QUESTION

PHP – Get the value of an unknown array key

Based on this result from an API "name": { "common": "Italy", "official": "Italian Republic", "nativeName": { "ita": { "official": "Repubblica italiana", "common": "Italia" } } }, Let's suppose i always want the "common" name but, depending on the country the…

VIEW QUESTION
Back To Top
Search