', $target);
$deneme[6] = explode('
', $target);
//
$count[1] = count($deneme[1]) /*- 1*/;
$count[2] = count($deneme[2]) - 1;
$count[3] = count($deneme[3]);
$count[4] = count($deneme[4]);
$count[5] = count($deneme[5]);
$count[6] = count($deneme[6]) - 1;
$count = max($count);
if (0 < $count) {
$count = !empty($max) ? $max : $count;
}
//$count = _maxlisting < $count ? 10 : $count;
if ($count == 0) {
if (!$related) {
include("layout/nothingfound.php");
}
} else {
if (!empty($related)) {
$count = 1;
}
while ($i <= $count) {
//primera fuente
//segunda fuente
//tercera fuente
//cuarta fuente
if(strpos($sourceUrl, 'indeed') !== false) {
//para titulos - cuarta fuente
$aud17 = explode('', $target);
$aud18 = explode('', $aud17[$i+2]);
$title4 = $aud18[0];
// para descripcion - cuarta fuente
$aud19 = explode('', $target);
$aud20 = explode('', $aud19[$i+1]);
$description4 = $aud20[0];
$aud21 = explode('', $target);
$aud22 = explode('', $aud21[$i+2]);
$link4 = $aud22[0];
$date4 = exx('', '', $target);
}
// septima fuente usando el codigo cuarta fuente .-. (?)
if(strpos($sourceUrl, 'ictergezocht') !== false) {
//para titulos - cuarta fuente
$aud23 = explode('', $target);
$aud24 = explode('', $aud23[$i+2]);
$aud24[0] = str_replace(array(
""
), array(
'',
''
), $aud24[0]);
$title5 = $aud24[0];
// para descripcion - cuarta fuente
$aud25 = explode('', $target);
$aud26 = explode('', $aud25[$i+1]);
$aud26[0] = str_replace(array(
""
), array(
'',
''
), $aud26[0]);
$description5 = $aud26[0];
$aud27 = explode('', $target);
$aud28 = explode('', $aud27[$i+2]);
$link5 = $aud28[0];
}
$info['title1'] = $title1;
$info['link1'] = $link1;
$info['description1'] = $description1;
$info['title2'] = $title2;
$info['link2'] = $link2;
$info['description2'] = $description2;
$info['title3'] = $title3;
$info['link3'] = $link3;
$info['description3'] = $description3;
$info['title4'] = $title4;
$info['link4'] = $link4;
$info['description4'] = $description4;
$info['title5'] = utf8_encode($title5);
$info['link5'] = $link5;
$info['description5'] = utf8_encode($description5);
$info['title6'] = $title6;
$info['link6'] = $link6;
$info['description6'] = $description6;
$info['date'] = $date;
$info['source_name'] = $sourceName;
$info['query'] = $query;
$info['location'] = $jobLocation;
$length = 500;
$text = "{$description}";
strip_tags($description);
$description = substr($text, 0, $length);
if (!$related) {
include("layout/search-results.php");
} else {
include("layout/related-results.php");
}
++$i;
}
}
}
function parse($countrySelect, $query, $jobLocation, $max)
{
$directory = "includes/sources/" . $countrySelect . "/";
$sources = glob($directory . "*");
foreach ($sources as $source) {
if (substr($source, 0 - 4) == ".php") {
require($source);
get_feeds($sourceUrl, $sourceName, $max, $related);
}
}
}
?> |