hiding iframe

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
m2babaey
Forum Contributor
Posts: 364
Joined: Sun May 20, 2007 9:26 am

hiding iframe

Post by m2babaey »

Hi
If I load one site in iframe on my page;how can I hide the code from view source code of the page that contain the iframe.
thanks
User avatar
jayshields
DevNet Resident
Posts: 1912
Joined: Mon Aug 22, 2005 12:11 pm
Location: Leeds/Manchester, England

Re: hiding iframe

Post by jayshields »

I don't quite understand what you're after, but if I'm on the right track, you want to hide the source code? Why?
m2babaey
Forum Contributor
Posts: 364
Joined: Sun May 20, 2007 9:26 am

Re: hiding iframe

Post by m2babaey »

yes. i want to hide the <iframe>...</iframe> because i want to hide the fact that i'm showing someone else's webpage
madan koshti
Forum Commoner
Posts: 50
Joined: Fri Jun 06, 2008 4:25 am

Re: hiding iframe

Post by madan koshti »

<iframe id="myframe" src="externalpage.htm" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" style="overflow:visible; width:100%; display:none"></iframe>

hope u need this ???????????????
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: hiding iframe

Post by Eran »

No, he means to hide the iframe from source code view. The way to do it is to inject the iframe to the document after it's loaded, using javascript. Using a tool like firebug would still reveal the iframe however.

I suspect that if you are trying to hide the fact you are taking content from another site, what you are doing is either illegal or unethical, so I suggest you reconsider.
m2babaey
Forum Contributor
Posts: 364
Joined: Sun May 20, 2007 9:26 am

Re: hiding iframe

Post by m2babaey »

No, he means to hide the iframe from source code view. The way to do it is to inject the iframe to the document after it's loaded, using javascript. Using a tool like firebug would still reveal the iframe however.

I suspect that if you are trying to hide the fact you are taking content from another site, what you are doing is either illegal or unethical, so I suggest you reconsider.
I understand. what I am saying to do in this forum are usually questions that refer to clients' requests. I look through php projects and check if I am able to do them. If have questions or find something interesting or surprising I come here or other forums to ask and learn.
This question refers to a scriptlance project ( at http://www.scriptlance.com/projects/1215113152.shtml) that is not subjected to me but I wanted to know if this is possible and how. not efforting to do illigal activities :wink:
Post Reply