URL);
$BlockStart = '
Tanečního partnera hledají:
';
$BlockEnd = '
';
$Content = GetTextBetween($Content, $BlockStart, $BlockEnd);
if ($Content == '')
{
$Output .= 'Main block not isolated.';
return $Output;
}
$ItemStart = '';
$ItemEnd = '
';
while (strpos($Content, $ItemStart) !== false)
{
$Item = GetTextBetween($Content, $ItemStart, $ItemEnd);
$MeetItem = new MeetItem();
$Time = trim(GetTextBetween($Item, 'Vloženo:', ''));
$MeetItem->Time = HumanDateToTime($Time);
$Gender = trim(GetTextBetween($Item, '', '
'));
if ($Gender == 'Hledám partnerku') $MeetItem->Gender = Gender::Male;
else $MeetItem->Gender = Gender::Female;
$MeetItem->Message = trim(strip_tags(GetTextBetween($Item, '', '
')));
$MeetItem->Email = trim(GetTextBetween($Item, 'class="nowrap text-link">', ''));
$MeetItem->Name = '';
$MeetItem->Age = GetAgeFromText($MeetItem->Message);
$MeetItem->Height = GetHeightFromText($MeetItem->Message);
$MeetItem->Weight = GetWeightFromText($MeetItem->Message);
$MeetItem->Phone = '';
$MeetItem->Location = 'Praha';
$MeetItem->Database = $this->Database;
$MeetItem->Source = $this->Id;
$this->MeetItems[] = $MeetItem;
}
return $Output;
}
}