Pulling a div from 3rd party domain to display on my webpage?
So here's what I am trying to do: I run a Veetle.com channel where I broadcast video. Veetle allows you to show the Schedule of programs to be played. I want to strip the information in this div container directly from my Veetle page, and di开发者_运维百科splay it on my personal webpage.
Originally I tried injecting CSS into an iframe containing the Veetle page that removed everything except the div containing the schedule. This didn't pan out so well, because apparently this is not allowed using 3rd party domains. This just became a HUGE headache.
I can't just chop everything out using inline stylesheet margins, because the audio from the broadcast will still be heard (even though it wouldn't be visable) & that could become very confusing to visitors of my webpage. To solve this I tried some javascript that removes embedded objects, but I ran into the whole scripting through an iframe on a 3rd party domain problem again.
Anybody got ANY ideas?
Try searching Google for "XMLHttpRequest cross domain" or something similar. I have used XMLHttpRequest locally before and it returns the results in a variable that you can strip everything else out of. The few sites I glanced at seem to indicate that it will work fine on other domains by sending a just a few extra headers.
Have you tried creating a proxy page on your server.
You can fetch the page server side, strip out what you need then write it out to a proxy page that you can access via ajax, iframe or directly writing it out to page.
精彩评论