We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update this function
public function scrapeByRegex(string $pageURL, string $regex): string { $ch = curl_init($pageURL); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET'); curl_setopt($ch, CURLOPT_COOKIE, $this->getApiKeyName() . '=' . $this->getApiKeyValue()); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); $response = curl_exec($ch); curl_close($ch); $result = []; preg_match($regex, $response, $result); if (count($result) !== 2) { throw new RuntimeException('Failed to fetch SNlM0e.'); } return $result[1]; }
The text was updated successfully, but these errors were encountered:
update CURLOPT_FOLLOWLOCATION!
Sorry, something went wrong.
@nghyane updated, thanks.
No branches or pull requests
Update this function
The text was updated successfully, but these errors were encountered: