Created
April 13, 2020 09:33
-
-
Save Padilo300/1f3a8a7e325565c6cb6cb78979a0d3bd to your computer and use it in GitHub Desktop.
AutoRia API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<pre> | |
<?php | |
$leadData = [ | |
'price_ot' => 4000, // Цена от... | |
'price_do' => 12000, // Цена до... | |
's_yers[1]' => 2016, //Год выпуска от... | |
'po_yers[1]' => 2019, //Год выпуска до... | |
'marka_id[0]' => 0, //Все марки модели | |
'phone' => 1, //Телефон автора обьявления | |
'count'=> 10, //Количество обьявлений на страницу | |
'UAH' => 1, //Валюта, 1-активно | |
'category_id'=> 1, //Только легковые автомобили | |
'with_photo'=> 1, //Только с фото | |
'page' => 1, | |
]; | |
$key = 'M0Vq8w35BDdccaC8wZJ5Gsq8opYGY8L5Sx0depxl'; | |
$url = 'https://developers.ria.com/auto/search?api_key=' . $key . '&' . http_build_query($leadData); | |
$result = file_get_contents($url); | |
$result = json_decode($result,1); | |
print_r($result); | |
?> | |
</pre> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://auto.ria.com/news/novinki/234029/auto-ria-delitsya-s-vami-samym-czennym-novyj-portal-api.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment