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

Commit b9281b2

Browse files
committed
Fix download url syntax
1 parent 3191006 commit b9281b2

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

download.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
<?php
2+
require_once __DIR__ . '/src/com/carlgo11/tempfiles/Autoload.php';
23

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

79
$curl = curl_init();
810
curl_setopt_array($curl, [
9-
CURLOPT_URL => $conf['api-download-url'],
11+
CURLOPT_URL => $d_url,
1012
CURLOPT_RETURNTRANSFER => TRUE,
1113
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_2,
1214
CURLOPT_CUSTOMREQUEST => 'GET',

src/com/carlgo11/tempfiles/config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@
2424
# Download URL
2525
'download-url' => 'https://d.carlgo11.com/%1$s/?p=%2$s',
2626
# API Download URL
27-
'api-download-url' => 'https://api.tempfiles.carlgo11.com/download/?id=%1$s&p=%1$s'
27+
'api-download-url' => 'https://api.tempfiles.carlgo11.com/download/?id=%1$s&p=%2$s'
2828
];

0 commit comments

Comments
 (0)