Jump to content

How would I cause a header to appear on other sites?


sillyrabbi

Recommended Posts

Hi, I'm wondering if it's possible to make so that when a user clicks a link on my site it will take them to another site (that I don't control), but with my header at the top of the page. The best example I can think of is Ask.com (as much as I dislike it as a search engine).

 

If you do a search for something and click on a result, it will take you to the selected page, however if you look at the top you can see the ask.com search bar and you're still technically at "ask.com". Is it possible to accomplish this using php? I don't need/want to do this for every page in the world, I'm just trying to create a webring of blogs, so I'd like to be able to have a header that links to each so long as the user stays within a couple different sites.

 

Any help would be great, I'm afraid I'm a little tired so my wording might be a little sloppy.

 

Thanks!

Ask.com uses iframes to get the result to load under their site. If you notice the title of the page and the url are not of the search result.

 

With php you could do something like

<a href="http://yoursite.com?url=http://blogurl.com">Link</a>

 

and on the display page

<iframe src="<?php echo $url; ?>">

Yea... thats right...

 

but it works for me. I've been told it shouldn't but my site works fine without the $_GET...

 

Sorry to go off topic, but: That's because you've got register_globals turned on. It's been off by default since PHP 4.2.0 released 7 years ago, and is highly discouraged to have turned on. Read my link, and then turn it off for your own good! :)

Awesome, that works almost perfectly (except that $_GET["$url"]; shouldn't have the second dollar sign)

 

Anyway I'm now wondering if it's possible to scale the iframe to 100% of the source file's height. (so I can just use the normal scrollbar instead of having two) I should probably also mention that the source file is not on my domain, it's a blog hosted by livejournal.

 

I've spent about 2 hours googling this and there's a few solutions but none of them seem to work. It probably doesn't help that a fair amount were posted in 2003 or so though.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.