mobmash.click/lib/request.php
2024-08-04 20:56:55 +02:00

12 lines
407 B
PHP

<?php
const USER_AGENT = "MobMash Updater/" . VERSION . " (+https://github.com/overflowerror/mobmash.click; contact: " . UPDATER_CONTACT_EMAIL . ")";
function get(string $url): string {
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_USERAGENT, USER_AGENT);
$response = curl_exec($curl);
curl_close($curl);
return $response;
}