Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function isOptivumTimetable(string $html) : bool
- {
- if (strpos($html, 'Plan lekcji Optivum firmy VULCAN') !== false) {
- return true;
- }
- libxml_use_internal_errors(true);
- $dom = new DOMDocument();
- $dom->loadHTML($html);
- $frames = $dom->getElementsByTagName('frame');
- /** @var \DOMElement $node */
- foreach ($frames as $node) {
- if ('lista.html' === $node->getAttribute('src')) {
- return true;
- }
- }
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement