Skip to content

Commit

Permalink
#23: remove a systematic PHP notice from noKey/index.php by passing…
Browse files Browse the repository at this point in the history
… by reference a variable to `end`
  • Loading branch information
Benjamin-Loison committed Feb 1, 2023
1 parent 6e38f7b commit 8da8080
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion noKey/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
$content = file_get_contents(KEYS_FILE);
$keys = explode("\n", $content);
$keysCount = count($keys);
$url = 'https://www.googleapis.com/youtube/v3/' . end(explode('/noKey/', $requestUri)) . '&key=';
$parts = explode('/noKey/', $requestUri);
$url = 'https://www.googleapis.com/youtube/v3/' . end($parts) . '&key=';
$options = ['http' => ['ignore_errors' => true]];
$context = stream_context_create($options);
/// is there any way someone may get the keys out ? could restrict syntax with the one of the official API but that's not that much clean
Expand Down

0 comments on commit 8da8080

Please sign in to comment.