This might be pushing the limits here.
I iframe some external websites into one of my own websites.
<iframe style="margin-top:20px;width:99%;height:600px;" src="http://www.website.com/"></iframe>
This works just fine and dandy. However, sometimes the sites are much longer than 600px. Which is not to be unexpected.
Is there a way to detect the height, or some method of lengt开发者_如何学Ch detection that I could work with?
I don't expect this is possible, but I thought I'd ask.
Because the website in the iframe is from another domain this is not possible with javascript due to the cross-domain security restriction.
As for using php check this SO question, there might be some ways to get a DOM representation of the page you are fetching.
精彩评论