Forum Moderators: open
I just don't want to know why you exactly want to do it. Note, this works for only IE I believe.
Mac
Note, this works for only IE I believe.
dunno about the others though.
regarding your question:
You could do this if you have your own domain, and want to show content from another domain, enter this in the index page of your own domain, changing the domain-to-include.com value:
<?php
include("http://www.domain-to-include.com");
?>
make sure the index page is index.php.
Sid
Also: where do I put <?php
include("http://www.domain-to-include.com"[smilestopper]);
?>
Do I put it in the body of index.php? That is so perfect.
if you cloak the cloaked source will show when you view > source. Right click will show the actual page source code and you can turn off right click using a java script.
although this still will not stop anyone from viewing your source as there are still so many other ways to view the source that you can no turn off.
In fact if people have something to hide it makes me want to know what it is so I get around all this other stuff just so I can have a look.
if you want to make it harder completely code your HTML in ASCII and then it will just look like a bunch of jibberish to most people. But this can also be converted in a blink of an eye.
sticky me though if you want more ASCII convertor info
1. Whichever path you choose, this will work a lot better if you control both sites. Disguising another person's website as your own can be legally dubious and there are ways they can block it if they find out.
2. With the PHP approach, your server will presumably have to download the source from the remote site and then transmit it to the user. That will be quite a bit slower and have a lot more bandwidth overhead than simply using a hidden frame.
3. I haven't tested it, but it also seems likely that relative links to images, .js files, CSS files and HTML pages would not work with the PHP approach. There may also be a problem setting cookies. You can work around this if you own both sites.
The php method does not work. Here is what the index.php page when I open it in my browser: Warning: Failed opening 'https://www.domain-name2.com' for inclusion (include_path='.:/usr/local/lib/php') domain-name1.com/index.php on line 3
I think I'll try the frames method. How can I block the bottom of the page from view?
#hideme {
display : none;
}
There, piece of page not displayed. If you're not using divs then you should be, plus it should work with a table too.
However, despite your claims to ebing doing something legal you are not willing to say what which leads to it's own insinuations. You know already it is illegal to pull information automatically (e.g. stock quotes) without permission and hiding the bottom of a page would point towards hiding logos and copyright info from the user.
The other main reason for hiding portions of text I have seen is in order to spam search engines, i'm sure you've all seen the way some sights contain a full dictionary of words hidden (white on white) at the end of a page. This is not illegal but is not condonable at all for any serious designer.
The only possible valid reason I could think of for wanting to hide urls and code would be to hide the parameters passed in a querystring so that users cannot manually alter them. However if you are doing anything this way that could cause damage then you seriously need to think about doing this another way.
Likewise the only reason I can legitimately think of for a hidden frame is for it to hold hidden variables but again there are better ways of doing this.
I suggest if you want more help on questionable techniques you should provide more details of what you are doing.
The PHP script is failing because it can't reference the file, and is then searching under the PHP root.
Save this code as "includeme.php":
<?
include "mycontent.inc";
?>
and then in the same directory, save this as "mycontent.inc":
<html>
<head>
<title>Successfully included</title>
</head>
</body>mycontent.inc successfully included</body>
</html>
When you then serve "includeme.php", your browser should then change to reflect the inclusion.
To replicate the error you were getting, move the "mycontent.inc" file up a directory, and you will get an error similar to:
Warning: main(): Failed opening 'mycontent.inc' for inclusion (include_path='.;c:\php4\pear') in C:\Webdesign\includeme.php on line 2
Hope this helps.
Regards,
Nick.
You don't know WHAT I am doing. Don't assume I am copying someone else's site. It is NOT what I am doing. I can understand why you think that but I assure you I am not doing that. What I am doing is strictly legitimate. I'm not so stupid I want to or need to copy someone else's page. I don't want to tell you here everything I am working on though in an effort to get you to stop judging me.
Sounds very dodgy like you're hiding something.
I have an information page from a parent company of mine I want to show potential customers without them seeing certain internal company links.
Thank you for the explanation, see it wasn't that hard was it :o). And I apologise for not thinking of everything.
Your best bet is a simple server side include or the equivalent in PHP if you wanted to display the whole page, but seeing as you want to hide some of it that wont work without some other kind of server side scripting as well to strip out the bits you want, rather than just hiding them.
This is much more difficult and to be honest at that stage I would seriously think it is easier just to create a seperate page on your clients site without the extra information present.