I have a website on the a.ru domain, the second on the b.ru domain. I have a url http://a.ru/some/request
, according to which the site a.ru returns html-code. How to request this code from b.ru?
|
3 answers
Here you need to use Ajax. Because of "Protection against piracy", you need to write b.ru
scripts, for example, in PHP
and access them ... And if you just display, then you can also use <ifarme>
.
|
You can use CURL.
|
And what does not fit
file_get_contents(url)
The function requests the HTML code of the page and returns it.
|