Created
May 10, 2025 16:47
-
-
Save ivanmercedes/9473320a35ae50fd408a819f0a4cef0b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| header('Content-Type: application/json'); | |
| header("Access-Control-Allow-Origin: *"); | |
| $username = 'TU_USERNAME'; | |
| $password = 'TU_PASSWORD'; | |
| $api_url = "https://el-api-de-pepe-donis.com/auth"; | |
| $ch = curl_init($api_url); | |
| curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | |
| curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); | |
| curl_setopt($ch, CURLOPT_USERPWD, "$username:$password"); | |
| $response = curl_exec($ch); | |
| $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); | |
| curl_close($ch); | |
| http_response_code($http_code); | |
| echo $response; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment