![]() |
html/php - iframes...
How to make something like iframe that will display the actual code of the other page in the source code? I think that there must be some html or php solution for that...
example I don't want in the source code : <iframe src ="/page.html" width="100%"> </iframe> but : code code code code code code code code and so on... Sorry for my another noob question, I would search the answer myself but I'm not sure what exactly I am looking for... so... :helpme |
err nevermind.
|
http://www.addressmunger.com/display_code/ here, use this.
|
w3schools.com visit this
|
thank you, but this not exactly what I am looking for :( I don't want to display the source code to the viewer, I want the viewer to see the actual content like pics and whole formating as it is on the original page, I just want that source code for search engines and to be viewed when I click on the browser bar view/source...
|
Quote:
|
Use CSS.
Make a div with a fixed size and this attribute: overflow: auto; :) Eh, nevermind. Thought you just wanted an iframe-like effect. |
Use file_get_contents() in php... then display it on a page that you iframe... I haven't tested that, may not work... but there is definitely a way without emulating a browser.
|
Now you get what I want :) I will test both these php functions. Thank you for help.
|
Some more info is needed, I think:
Is the file remote or local? If it's remote, you probably should retrieve it, store it locally and include it with a simple php include. If it's local, you can just use a simple php include. Is the file a full html document or a snippet of html that uses the same formatting style as the page its in does? If it's a full html document, simply including it will most likely cause layout problems. If it's a snippet, it might still cause problems, but those should be easier to solve. |
Quote:
|
Quote:
|
Quote:
|
Quote:
|
Quote:
Do you want to include full pages though, or just snippets of html? |
Quote:
|
Quote:
Assuming that the page they're being included in is a full page with a separate design as well, you have a bit of a problem. You could either get a custom include version that strips parts of html from the file being included (things like html tags, head tags, body tags, etc), or just strip it manually from those files and upload non-full versions as well, then include those. The first version will require a bit of coding and will cause unnecessary server load, so I'd go for the second version if I were you. Of course, if there are many files, you might want to write/get a simple script that processes the whole batch. Oh, and depending on the files being included and the ones they're being included in, there's the possibility of conflicting code. |
All times are GMT -7. The time now is 04:17 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123