Php obtains the title of frame. I have a website. The domain name A.com of a website is an empty shell, but is embedded with a frame that points to another website (B .com/XXX ). I want to automatically synchronize the title of A.com with that of B .com/xxx. I don't know what to do ......, JavaScript originally allows php to obtain the title of the frame.
I have a website. The domain name A.com of a website is an empty shell, but is embedded with a frame that points to another website (B .com/XXX ).
I want to automatically synchronize the title of A.com with that of B .com/xxx.
I don't know what to do ......
------ Solution --------------------
JavaScript can be done, but most search engines do not execute js, so it is better to implement it in the background.
For example, first file get contents B .com/xxx to get the title and then set the title of a.com
------ Solution --------------------
Because it is an embedded iframe, the Javascript of website A has no permission to obtain the title of website B. It can only be updated in the background through php.
A can actively poll B on A regular basis, or B actively calls A's interface when the title changes
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.