开发者

jquery or php detect external site length

开发者 https://www.devze.com 2023-03-13 09:28 出处:网络
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/\">&l

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消