⊗ppSpAiSU 41 of 83 menu

API With a Single URL in PHP

Let's warm up by creating an API with a single address that can be requested. Let this address be the following:

http://api.loc/index.php

For example, let our API return a random number from 1 to 100 when accessing the address:

<?php echo mt_rand(1, 100); ?>

Create an API that will return the current time in the hours-minutes-seconds format.

English
AfrikaansAzərbaycanБългарскиবাংলাБеларускаяČeštinaDanskDeutschΕλληνικάEspañolEestiSuomiFrançaisहिन्दीMagyarՀայերենIndonesiaItaliano日本語ქართულიҚазақ한국어КыргызчаLietuviųLatviešuМакедонскиMelayuမြန်မာNederlandsNorskPolskiPortuguêsRomânăРусскийසිංහලSlovenčinaSlovenščinaShqipСрпскиSrpskiSvenskaKiswahiliТоҷикӣไทยTürkmenTürkçeЎзбекOʻzbekTiếng Việt
We use cookies for website operation, analytics, and personalization. Data processing is carried out in accordance with the Privacy Policy.
accept all customize decline