I’m working on a search page, and I’m trying to use several iframe’s within my PHP search results page. Like this:
echo "<IFRAME SRC=\"{$r['url']}\" ALIGN=left WIDTH=100% HEIGHT=220 SCROLLING=yes FRAMEBORDER=1 MARGINWIDTH=2 MARGINHEIGHT=2></IFRAME><BR CLEAR=right>";
My problem is that SOMETIMES, depending on which URL/web site gets selected, my results page gets overridden by getting redirected to one of the web sites I’m trying to use in my iframe. In other words, my results page starts off displaying things fine, including other web sites within iframes, then usually before my results page has finished loading, I get redirected to one of the actual web sites (from one that was on my list of search results). It’s not always the first or last one on my results list, just random, it could happen from any on my results list.
In case you ask, no I’m not using any HTML redirects or PHP header with location. What I think might be happening is that some of these sites probably check to see if they are being displayed from their own domain, and because of the iframes I’m using from my site, it doesn’t look that way to them, so they redirect to their own domain (home page).
I tried using buffering (ob_start) just to see if it makes a difference and it didn’t. I don’t think even a custom output buffer filter function would help - like: ob_start(‘output_handler’).
Is my theory correct, or is there something else happening?
Does anyone know if there is a way to stop the redirects from occurring?