Answer the question
In order to leave comments, you need to log in
How to combine 2 requests into one html?
Task: Combine information from 2 or more different queries.
I need to generate HTML which I must eventually write to the database.
There are 2 sites that I have to make requests to, different sites give different information, sites respond through the callback option, i.e. - sent a request and you need to accept the answer on my side, all I do is.
As a result, having accepted the callback, we have something like this:
Сайт 1 вернул:
$html1 = "Погода в Москве: <span style="color: red">-5";
Сайт 2 вернул:
$html2 = "Погода в Барселоне: <span style="color: green">+19";
$REPLY
and write it to the database. Answer the question
In order to leave comments, you need to log in
1. Generators ( publication )
2. https://amphp.org/amp/ ( publication )
(3. multi_curl )
+ Bonus
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question