This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
WebsiteParser::grabContent()
A private method grabs website content using cUrl And put content it into a class variable Can be replace by file_get_contents() but it’s very slow, cpu intensive and does not handle redirects, caching, cookies, etc.
Description
Source
File: bp-activity/vendors/website-parser/website_parser.php
private function grabContent() { try { $ch = curl_init($this->target_url); curl_setopt_array($ch, $this->curl_options); $this->content = curl_exec($ch); if ($this->content === FALSE) { throw new Exception(); } } catch (Exception $e) { $this->message = 'Unable to grab site contents'; } curl_close($ch); }
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.