Skip to content

Commit

Permalink
Update WikipediaBot.php
Browse files Browse the repository at this point in the history
  • Loading branch information
GlazerMann authored Jan 31, 2024
1 parent ddd5f4d commit 61afb86
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions WikipediaBot.php
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ static private function QueryAPI(array $params) : string {
curl_setopt_array(self::$ch, [
CURLOPT_POST => TRUE,
CURLOPT_POSTFIELDS => http_build_query($params),
CURLOPT_HTTPHEADER => [],
CURLOPT_URL => API_ROOT,
]);

Expand Down Expand Up @@ -402,6 +403,7 @@ static public function get_links(string $title) : string {
static public function GetAPage(string $title) : string {
curl_setopt_array(self::$ch,
[CURLOPT_HTTPGET => TRUE,
CURLOPT_HTTPHEADER => [],
CURLOPT_URL => WIKI_ROOT . '?' . http_build_query(['title' => $title, 'action' =>'raw'])]);
$text = (string) @curl_exec(self::$ch);
return $text;
Expand Down

0 comments on commit 61afb86

Please sign in to comment.