Skip to content
This repository has been archived by the owner on Mar 29, 2024. It is now read-only.

Commit

Permalink
Fix download url syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlgo11 committed Jan 25, 2020
1 parent 3191006 commit b9281b2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion download.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<?php
require_once __DIR__ . '/src/com/carlgo11/tempfiles/Autoload.php';

function getCURL(string $id, string $password) {
require_once __DIR__ . '/src/com/carlgo11/tempfiles/Autoload.php';
global $conf;
$d_url = sprintf($conf['api-download-url'], $id, $password);

$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $conf['api-download-url'],
CURLOPT_URL => $d_url,
CURLOPT_RETURNTRANSFER => TRUE,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_2,
CURLOPT_CUSTOMREQUEST => 'GET',
Expand Down
2 changes: 1 addition & 1 deletion src/com/carlgo11/tempfiles/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@
# Download URL
'download-url' => 'https://d.carlgo11.com/%1$s/?p=%2$s',
# API Download URL
'api-download-url' => 'https://api.tempfiles.carlgo11.com/download/?id=%1$s&p=%1$s'
'api-download-url' => 'https://api.tempfiles.carlgo11.com/download/?id=%1$s&p=%2$s'
];

0 comments on commit b9281b2

Please sign in to comment.