i am working on php site. i want to show the web page content of external site in my site. Is there any solution to show only content of external site web page in my site.
Your solution will be appreciated.
Thanks in advance.
There's no need for jQuery, CSS even PHP if the site isn't preventing itself from being iframed.
iframe simply works like this:
<iframe src="http://google.com" ...></iframe>
If the site is preventing being iframed, you may want to use file_get_contents, then display the data retrieved in a DIV or other non-iframe element.
Related
I am working on a site for a Client and they want to display the following URL in an iFrame:
https://www.vigrxplus.com/ct/3134
If you access that site directly, it will show the Promo code on the source website.
However, if you access that site via an iFrame, it will not show the Promo code on the source website:
https://jsfiddle.net/qc3zvo0b/
<iframe width="100%" height="1000" src="https://www.vigrxplus.com/ct/3134"></iframe>
(Make sure to test the iFrame without prior Cookies from having previously visited the source website directly.)
Attempting to enable all sandbox features for iFrame did not fix this.
The source site also seems to do some kind of redirect.
So how can this be fixed such that the iFrame behaves just like visiting the site directly?
I am trying to embed a website in an HTML application that has links. I've tried this:
<iframe id="frame" application="yes"></iframe>
(I haven't really figured out the size) and it worked, just you can't use links on the page. I would usually just put the code of the webpage into the hta file, but there were some problems with javascript. I need to make a multi-page site, so I need links. Is there a way to embed a website that has links onto an HTML app, and still keep the links working? Thank you for any help.
I have some links from remote website [not in my control]. I am trying to display links given by remote website on my personal website. Remote website links contains pop ups.
I want the pop ups to display inside iframe windows. By default they open a popup inside the same windows and close my personal website.
I am using this code.
<iframe scrolling="no" name="popads" width="450" height="450" src="Remote Website"></iframe>
Thanks to give solutions for this problem.
If you are using jQuery, you can use jQuery Dialog. Its simple and clean.
https://jqueryui.com/dialog/
This cannot be done this way.
You cannot alter the way another website works. This would be called "cross-site-scripting"
You would have to download those sites to your webserver (for example with PHP), alter the code and then deliver them as yours FROM YOUR SERVER.
Then you can include those altered sites in your iframes.
(There are also online services for altering webpages, for example "Yahoo pipes")
So I am currently working on a local web-based application. Here are the facts:
I am using the CSS page transitions found here:
http://tympanus.net/Development/PageTransitions/ Due to this, each "page" of my application is contained in it's own div in a single file.
Example:
<div class="pt-page pt-page-1">
<!-- Page 1 content goes here ... -->
</div>
<div class="pt-page pt-page-2">
<!-- Page 2 content goes here ... -->
</div>
...etc
The client wants to be able to view Powerpoint (.ppt) files directly on the web browser. To attempt a quick and dirty solution, I have installed the Chrome extension "Chrome Office Viewer" https://chrome.google.com/webstore/detail/chrome-office-viewer-beta/gbkeegbaiigmenfmjfclcdgdpimamgkj?hl=en to each machine(this application is going to be isolated to just four machines that will be using Chrome for the application, so usability isn't an issue here)
What I WANT to have happen is to link to the .ppt file in an iFrame in one of my <div> pages as seen above, so when the user clicks on a link to view the PowerPoint, the page transitions and the slides can be viewed within the iFrame due to the Chrome Extension capabilitiy.
What CURRENTLY happens is that as soon as the application loads, the page redirects to the browser FROM the original application page to a seperate page to view the .ppt file. I would like this to be done inside of the <iframe> as mentioned earlier instead of an entire page redirect...
Is this possible or am I limited due to the construction of the Chrome Extension itself? I can always have the client save their .ppt as images and then display those within a <div> page, but I figured the Chrome Extension would be the quickest solution. Any ideas? Thanks in advance.
You can use Google Drive web publishing and embed your documents by iframes.
https://support.google.com/drive/answer/37579
Try making a .html or .php (depending if you use php) and link the .ppt in it, and then just put that .html in an iFrame.
<div class="pt-page pt-page-1">
<iframe src="/page 1 file linked here"></iframe>
</div>
<div class="pt-page pt-page-2">
<iframe src="/page 2 file linked here"></iframe>
</div>
If it still redirects then its an extension thing.
Also in future try keeping away on reliance to extensions and browsers, they are not really reliable enough for commercial use.
And whats the intention of this system? If its gonna stay in the office for work why does it need fancy transitions?
EDIT:
If you need those .ppt files to be dynamic you can use PHP for dynamic .html creation.
http://www.microsoft.com/web/solutions/powerpoint-embed.aspx
This might help, unfortunately I couldn't find any other way, using iframe forces the browser to download the file, and embedding also doesn't work here. Moreover, this method also allows you to add controls below, and its almost same as an iframe window. :)
I used to display web pages in iframes. But when I tried to display my stackoverflow user info in an iframe, it went wrong. The content is not getting displayed. What may be the possible reason (or reasons) for this behavior? How can I display my page in an iframe? Is it possible to display it in iframe with pure html or is there any need for javaScript or AJAX or something like that? If this is not possible, is there any workaround for this?
Here is a Live Demo.
A possible reason for this could be same as that of Google. As some sites do not allow their sites to be iframed.
To quote from #Daan:
Google uses an X-FRAME-OPTIONS HTTP header to disallow putting their pages in iframes: https://developer.mozilla.org/en/The_X-FRAME-OPTIONS_response_header
Could be a case with SO too.