feat: curl (#12)

This commit is contained in:
Saahil dutta 2024-12-21 23:00:57 -05:00 committed by GitHub
parent 6f50b72003
commit af763b0fa1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 77 additions and 0 deletions

10
public/index.php Normal file
View file

@ -0,0 +1,10 @@
<?php
// get useragent header
$user_agent = $_SERVER['HTTP_USER_AGENT'];
if(strpos($user_agent, 'curl') !== false) {
include 'php/curl.php';
} else {
include 'index.html';
}
?>