Исправить file_get_contents('')
5 USDНе работает функция получения данных: file_get_contents('')
Также: curl
Получаем данные c allegro.pl, в категориях товары есть, карточка товара пустая.
Данные идут через парсер.
_____________________________
Возможно не описал каких то моментов потому что сам их не очень хорошо понимаю в любом случае нюансы обсудим. Пишите предложения. Оперативно интересует цена вопроса, хотя бы примерная.
Превышение количество запросов, код 429
<?php
if (isset($_GET['product_id'])) {
$product_id = $_GET['product_id'];
echo file_get_contents('http://allegro.pl/show_item.php?item='.$product_id);
} else {
echo 'empty product_id';
}
function curlA1($url) {
$url = str_replace("https", "http", $url);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_COOKIEJAR, 'cook.txt');
curl_setopt($curl, CURLOPT_COOKIEFILE, 'cook.txt');
curl_setopt($curl, CURLOPT_USERAGENT, "Opera/10.00 (Windows NT 5.1; U; ru) Presto/2.2.0");
curl_setopt($curl, CURLOPT_FAILONERROR, 1);
curl_setopt($curl, CURLOPT_REFERER, 'http://allegro.pl/');
curl_setopt($curl, CURLOPT_TIMEOUT, 30);
curl_setopt($curl, CURLOPT_HEADER, 0);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0); // не проверять SSL сертификат
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0); // не проверять Host SSL сертификата
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, TRUE); // разрешаем редиректы
curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
return curl_exec($curl);
curl_close($curl);
}
function file_get_contentsA1($url) {
try {
$data = file_get_contents($url);
return $data;
} catch (Exception $exc) { }
}
-
1400 76 6 3 если у вас впс, могу поднять тор и через него будете получать страницы, если будет ошибка то генерируете новый ИП и парсите дальше
-
471 36 2 1 Добрый день. В коммерческой разработке с 2015 года. За этот период реализовал множество задач различной степени сложности от самых простых до самых сложных. Смогу выполнить ваш проект. Более детально в ЛС.
-
2643 427 9 1 Интересуют подробности
=- =-= -= -= =- =- =- =- =- = -=- =- =- = -= -= -=- = - =-= - =- =- =- =- = -= -= -
-
6474 229 4 7 Добрый день. Посмотрю и исправлю сейчас. Большой опыт работы с curl. Я на связи.
-
а) низкий бюджет б) подробности, что пишет в сообщении об ошибке
-
Превышение количество запросов, код 429
https://www.zpl-ua.com/product.php?product_id=6604307557
<?php
if (isset($_GET['product_id'])) {
$product_id = $_GET['product_id'];
echo file_get_contents('http://allegro.pl/show_item.php?item='.$product_id);
} else {
echo 'empty product_id';
}
function curlA1($url) {
$url = str_replace("https", "http", $url);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_COOKIEJAR, 'cook.txt');
curl_setopt($curl, CURLOPT_COOKIEFILE, 'cook.txt');
curl_setopt($curl, CURLOPT_USERAGENT, "Opera/10.00 (Windows NT 5.1; U; ru) Presto/2.2.0");
curl_setopt($curl, CURLOPT_FAILONERROR, 1);
curl_setopt($curl, CURLOPT_REFERER, 'http://allegro.pl/');
curl_setopt($curl, CURLOPT_TIMEOUT, 30);
curl_setopt($curl, CURLOPT_HEADER, 0);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0); // не проверять SSL сертификат
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0); // не проверять Host SSL сертификата
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, TRUE); // разрешаем редиректы
curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
return curl_exec($curl);
curl_close($curl);
}
function file_get_contentsA1($url) {
try {
$data = file_get_contents($url);
return $data;
} catch (Exception $exc) { }
}
-
Программист с которым я работаю, не может найти решение.
-
Current freelance projects in the category PHP
Multifunctional HTML template for a betting website and parsing match API (
25 USD
I have a Sportsbook API, I need to download a template for an online betting website from the internet and integrate match parsing and a payment system into it) the task is very simple, write who can do it right away) essentially, I need a basic website for testing with a… PHP, Python ∙ 22 minutes back ∙ 4 proposals |
Resolve the loading issue on the PrestaShop website hostingThe website requires more and more resources each month. The host's response: During the server check, increased load from the MySQL database server was recorded. At times of the 500 error, the MySQL process uses a significant portion of CPU resources, which can lead to unstable… PHP, Databases & SQL ∙ 1 hour 18 minutes back ∙ 10 proposals |
Integration needed: KeyCRM → Cash Register KashalotIt is necessary to set up integration between KeyCRM and the Cash Register Kahalot. When placing an order in KeyCRM, the data must be automatically transmitted to Kahalot: • order information • products, nomenclature • prices • quantity More details in private. Content Management Systems, PHP ∙ 2 hours 38 minutes back ∙ 13 proposals |
Development of a single project based on the refinement and integration of 4 scriptsHello. I need to combine 4 scripts from different authors into a single environment. The composition includes a forum, a video portal, an article portal, and a classifieds board. I will provide the scripts. Detailed specifications are in the attached files. Please think about… PHP, Web Programming ∙ 1 day 8 hours back ∙ 28 proposals |
A WordPress site using the Kadence theme and Kadence Blocks.
225 USD
We need to create a website on WordPress using the Kadence theme and Kadence Blocks. There will be no online store (although it may be added in the future). We need a homepage and several internal pages. The graphics are already prepared, the layout structure is mostly defined,… Content Management Systems, PHP ∙ 1 day 12 hours back ∙ 37 proposals |