- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
$type = ($_POST['type'] == 'any') ? '' : str_replace(' ', '%20', str_replace('|','%7C', $_POST['type']));
$make = ($_POST['make'] == 'any') ? '' : str_replace(' ', '%20', str_replace('|','%7C', $_POST['make']));
$url = 'http://www.cycletrader.com/search-results?sort=featured%3Aasc&page='.$_POST['page'].'&type='.$type.'&make='.$make;
$str = getCurlObject($url);
$content = multiexplode('<div id="searchPage"', '<div class="footer', $str);
$list = multiexplode('<div id="gridView"', '<div class="rezDetailsBtm', $content);
$field = explode('<div data-url=', $list);
for ($k = 1; $k < count($field); $k++) {
$title_tmp = multiexplode('<a class="listing-info-title', '</a>', $field[$k]);
$title = multiexplode('title="', '"', $title_tmp);
$link = $lang['dir'].'detail?'.$_POST['form'].'&'.multiexplode('href="', '"', $title_tmp);
$img_tmp = multiexplode('<img', '/>', $field[$k]);
$img = multiexplode('data-src="', '"', $img_tmp);
$price_tmp = multiexplode('class="price', '</span>', $field[$k]);
if (strripos($price_tmp,'<span class="mileage">')) {
$price = multiexplode('<span>', '<span', $price_tmp);
} else {
$price = multiexplode('<span>', '</span>', $price_tmp);
}
if (trim($price) == 'Call for price') $price = '';
$result['item'][$k]['link'] = $link;
$result['item'][$k]['title'] = $title;
$result['item'][$k]['img'] = $img;
$result['item'][$k]['price'] = $price;
$result['item'][$k]['location'] = $location;
}
if (strripos($content,'<div class="pagination')) {
$pagination = multiexplode('<div class="pagination', '</div>', $content);
$pagination_tmp = multiexplode('<span class="hidden-xs','</div>', $pagination);
$pagination_item = explode('<li', $pagination);
if (count($pagination_item) > 6) {
$result['pagination'] = true;
}
}
AnalThermos 28.11.2018 11:14 # −3
1024-- 28.11.2018 22:24 # 0
Goh 28.11.2018 23:08 # 0
1024-- 28.11.2018 23:16 # 0
Goh 28.11.2018 23:32 # 0
guest8 29.11.2018 02:11 # −999
inkanus_gray 29.11.2018 02:35 # 0
Неожиданная встреча, правда?
1024-- 29.11.2018 16:39 # 0
another_fake 29.11.2018 16:52 # 0
another_fake 29.11.2018 13:48 # 0
А тебя там уже ждёт
Свежий "inkanus-gray",
Прямо с фаечных полей.
Натуральный продуккт, без ГМО и коньсервантесов.