Jump to content

Possible iframe question

Recommended Posts

Hello,I'm a student currently working for a university as a web development assistant. One of the departments on campus wants to pull the threat level from the department of homeland security (DHS) into their website. I had hoped that there would be a widget through the DHS website, but there is not. We cannot legally use any of the widgets through other websites as everything needs to be official.My question is this: Is there a way that I can use an iframe, or other sort of include type element to pull in a single <div> from their website? If somebody could even point me in a direction that might work, it would be greatly appreciated.Thanks!

Link to post
Share on other sites

If you have access to PHP, you can load the document as a DOM Document. This will allow you to use DOM methods on it, rather than searching through it like a string. If you have a fixed attribute to identify the <div> by (hopefully an id), then getting the node content will be easy easy easy. You would then write that content into your own document before serving it.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...