PHP cURL
Здравствуйте.
Суть задачи, передать информацию на сторонний сайт и получить ответ.
Имеется.
Сайт-1 который имеет авторизацию. После авторизации доступна форма с одним полем и кнопкой.
После отправки значения из данного поля нам приходит ответ, что все отправлено.
Сайт-2 с которого мы хотим обращаться к Сайт-1.
Сайт-2 имеет форму с одним полем, где будет вводиться значение и передаваться на Сайт-1.
На Сайт-2 я сделал вот такой вот метод, который проходит авторизацию а так же должен отправить данные на Сайт-1. Но в ответ мне приходит сама форма, которая мне по сути ненужна. Или не проходит пеедача значения.. Незнаю...
public function getSendDiscount()
{
$ch = curl_init();
if($ch){
curl_setopt($ch, CURLOPT_URL, $this->urlsite);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
//Авторизуемся
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($this->params));
curl_setopt($ch, CURLOPT_COOKIEFILE, '/cookie.txt');
curl_setopt($ch, CURLOPT_COOKIEJAR, '/cookie.txt');
// делаем POST запрос
curl_setopt($ch, CURLOPT_POST, 1);
// добавляем данные
curl_setopt($ch, CURLOPT_POSTFIELDS, ['discount' => $this->discount]);
$output = curl_exec($ch);
curl_close($ch);
echo iconv('utf-8', 'windows-1251', $output);
}
}
-
225 11 1 1 Добрый день. Готов приступить к выполнению, имею опыт работы с CURL разного уровня сложности (от работы с API до парсинга твиттера). Гарантирую быстрое и качественное выполнение
-
372 19 0 Нужно смотреть как обрабатывается форма на сайте Сайт-1 , как написана функция там и как она возвращает ответ
-
812 47 0 Здравствуйте.
Готов решить задание.
Есть идея как реализовать.
Подключу также JavaScript.
Нужно посмотреть сайт с формой.
-
5705 263 0 Добрый день, готов взяться за решение проблемы с скриптом, пишите в лс
-
1 day5 USD
306 35 1 1 1 day5 USDДобрый вечер, готов наладить работу вашего скрипта, пишите, обсудим
-
Хм, а есть возможность получать что либо иное кроме text/html ?
-
обращатся нужно к странице где обработка, а не форма, или форма в том же файле где и обработка?
-
Current freelance projects in the category PHP
Parser expireddomains.net
113 USD
A parser is needed for expireddomains.net. You need to log in to the site first; the problem is that it blocks the IP when trying to parse data. You need to parse thematic domains based on a list of keywords. If you are not confident in your abilities, please do not write. PHP, Web Programming ∙ 1 day 21 hours back ∙ 48 proposals |
Integration of payment service with Sales Force
70 USD
There is a payment system widget on the site that needs to be integrated with Salesforce so that all required parameters are visible on the Salesforce side. It needs to be done in such a way that all payments and subscriptions are controlled through Salesforce. PHP, Web Programming ∙ 2 days 1 hour back ∙ 40 proposals |
Intercom systems
90 USD
We are looking for an experienced BAS (1C 8.3) programmer to refine a custom configuration for the business processes of our company. What is needed: — Study the current custom BAS 8.3 configuration — Refine and adjust it to our processes — Accounting: clients, contracts,… PHP, Databases & SQL ∙ 5 days back ∙ 13 proposals |
Exporting goods from 1C to prom.uaCreate and configure an API export module for products from 1C to the cabinet and to the site prom.ua, rozetka, or another marketplace of your choice, including stock, names, images from 1C, prices, automatic export, automatic updates. PHP, Databases & SQL ∙ 5 days 16 hours back ∙ 21 proposals |
Fix the WPML translation issueThe website has product translation set up through the Advanced Editor. The translations in the editor are correct, but the incorrect text is displayed on the site. If you go to the page editor (in the language we are translating to), that is exactly the text indicated (in… PHP, Web Programming ∙ 6 days 17 hours back ∙ 37 proposals |