Skip to content

Commit 28e63f5

Browse files
authored
typo
1 parent bf85f0b commit 28e63f5

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

KBBIModel.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ private function _user_agent(){
7474

7575
private function _fetchHtml($word)
7676
{
77-
$userAgents = $this->_user_agent();
77+
$userAgent = $this->_user_agent();
7878
$encodedWord = rawurlencode($word);
7979
$url = "https://kbbi.kemdikbud.go.id/entri/" . $encodedWord;
8080
$ch = curl_init($url);
@@ -83,13 +83,13 @@ private function _fetchHtml($word)
8383
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
8484
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); // Disable SSL host verification
8585
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // Disable SSL peer verification
86-
curl_setopt($ch, CURLOPT_USERAGENT, 'Localhost');
87-
curl_setopt($ch, CURLOPT_HTTPHEADER, ['X-Forwarded-For: 127.0.0.1']);
86+
// curl_setopt($ch, CURLOPT_USERAGENT, 'Localhost');
87+
// curl_setopt($ch, CURLOPT_HTTPHEADER, ['X-Forwarded-For: 127.0.0.1']);
8888
curl_setopt($ch, CURLOPT_TIMEOUT, 20);
8989
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
9090
curl_setopt($ch, CURLOPT_ENCODING, 'gzip,deflate');
9191
curl_setopt($ch, CURLOPT_MAXREDIRS, 3);
92-
curl_setopt($ch, CURLOPT_USERAGENT, $userAgents);
92+
curl_setopt($ch, CURLOPT_USERAGENT, $userAgent);
9393

9494
$response = curl_exec($ch);
9595

@@ -104,7 +104,7 @@ private function _fetchHtml($word)
104104

105105
private function _request__KBBI_API_Zhirrr($word)
106106
{
107-
$userAgents = $this->_user_agent();
107+
$userAgent = $this->_user_agent();
108108
$encodedWord = rawurlencode($word);
109109
$url = "https://kbbi-api-zhirrr.vercel.app/api/kbbi?text=" . $encodedWord;
110110
$ch = curl_init($url);
@@ -113,13 +113,13 @@ private function _request__KBBI_API_Zhirrr($word)
113113
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
114114
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); // Disable SSL host verification
115115
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // Disable SSL peer verification
116-
curl_setopt($ch, CURLOPT_USERAGENT, 'Localhost');
117-
curl_setopt($ch, CURLOPT_HTTPHEADER, ['X-Forwarded-For: 127.0.0.1']);
116+
// curl_setopt($ch, CURLOPT_USERAGENT, 'Localhost');
117+
// curl_setopt($ch, CURLOPT_HTTPHEADER, ['X-Forwarded-For: 127.0.0.1']);
118118
curl_setopt($ch, CURLOPT_TIMEOUT, 20);
119119
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
120120
curl_setopt($ch, CURLOPT_ENCODING, 'gzip,deflate');
121121
curl_setopt($ch, CURLOPT_MAXREDIRS, 3);
122-
curl_setopt($ch, CURLOPT_USERAGENT, $userAgents);
122+
curl_setopt($ch, CURLOPT_USERAGENT, $userAgent);
123123

124124
$response = curl_exec($ch);
125125

0 commit comments

Comments
 (0)