Untitled
unknown
plain_text
a year ago
531 B
4
Indexable
<?php class ApiRequest { private $apiUrl; public function __construct($apiUrl) { $this->apiUrl = $apiUrl; } public function getRequest() { $context = stream_context_create(); $result = file_get_contents($this->apiUrl, false, $context); return $result; } } $apiUrl = "https://localhost:8888/kristapsskola/get_end.php"; $apiRequest = new ApiRequest($apiUrl); $response = $apiRequest->getRequest(); echo "API Atbilde: " . $response; ?>
Editor is loading...
Leave a Comment