AddCompareTime = false; $this->AddCompareRemoteId = true; $Content = file_get_contents($this->URL); $BlockStart = '
'; $BlockEnd = ''; $Content = GetTextBetween($Content, $BlockStart, $BlockEnd); if ($Content == '') { $Output .= 'Main block not isolated.
'; return $Output; } $ItemStart = '
'; while (strpos($Content, $ItemStart) !== false) { $Item = GetTextBetween($Content, $ItemStart, $ItemEnd); $MeetItem = new MeetItem(); $MeetItem->Link = trim(GetTextBetween($Item, '

Title = trim(GetTextBetween($Item, '>', '')); $MeetItem->Message = trim(GetTextBetween($Item, '

', '
')); $MeetItem->Location = trim(GetTextBetween($Item, '>Město: ', '
')); $MeetItem->Time = time(); $MeetItem->Database = $this->Database; $MeetItem->Source = $this->Id; $Output .= $this->ImportItem($MeetItem); $this->MeetItems[] = $MeetItem; } return $Output; } function ImportItem(MeetItem &$MeetItem): string { $Output = ''; $Content = file_get_contents($MeetItem->Link); $BlockStart = '
'; $BlockEnd = 'Odpovědět na inzerát'; $Content = GetTextBetween($Content, $BlockStart, $BlockEnd); if ($Content == '') { $Output .= 'Main block not isolated.
'; return $Output; } $MeetItem->Title = trim(GetTextBetween($Content, '
', '
')); $MeetItem->Name = trim(GetTextBetween($Content, '
Jméno:', '
')); $MeetItem->Gender = GetGenderFromName($MeetItem->Name); $MeetItem->Location = trim(GetTextBetween($Content, 'Město: ', '
')); $MeetItem->Message = trim(GetTextBetween($Content, '

', '

')); $MeetItem->Age = GetAgeFromText($MeetItem->Message); $MeetItem->Height = GetHeightFromText($MeetItem->Message); $MeetItem->Weight = GetWeightFromText($MeetItem->Message); $MeetItem->Email = GetEmailFromText($MeetItem->Message); return $Output; } }