Page 1 of 1
Posted: Wed Sep 16, 2009 7:42 pm
by TPRJones
So I've got a site to track the comics I read daily, and I wrote it in php. I use an iframe to display the target sites, but I hate frames and I was wondering if anyone here who knows php might be able to point me to a non-framed solution for including a separate (and, of course, dynamically linked) web page into a php-derived page.
Here's the current (framed) version: comics.tprjones.com
Any suggestions?
Posted: Wed Sep 16, 2009 7:53 pm
by TPRJones
Oh, and I've tried:
<?php include($link); ?>
Where $link is the full "http://" address, but it doesn't work. It pulls in the page itself, but if it's links are relative it looks for the images on my server instead of the target server. I need something that will parse the relative links as absolute on the other server.
Posted: Wed Sep 16, 2009 7:53 pm
by GORDON
There are frames on that page?
Posted: Wed Sep 16, 2009 7:54 pm
by GORDON
Oh, do you mean that button bar at the top?
Posted: Wed Sep 16, 2009 8:05 pm
by TPRJones
Nah, that's the actual page, the bit below there where the comics are showing up is the frame. If the comic page is larger than the frame you'll start to get the scrolly bars showing up.
The problem is the frame size - even when expresses as a % of window size isn't really all that dynamic and is a bit annoying. If I size it for good full-screen viewing it's annoyingly large for smaller windows, and vice versa. I'm hoping there's a way to just stream in the linked page so that there's never any iframe scrollers which have an annoying tendency to get tucked behind the edges of the window when not fullscreen.
Edited By TPRJones on 1253146009
Posted: Wed Sep 16, 2009 8:11 pm
by TPRJones
Although, thinking on it further, if I do it as some sort of include that could mess up referrals. As an iframe click-throughs on ads and stuff still go to the originator, which is good. I'm not trying to steal credit or clicks or anything from anyone here. The only thing that gets borked are cookies, and none of the sites I load in deal out cookies (although my site does, so it knows where you were when you come back).
If I include or embed somehow I guess that could mess up mess up click-throughs and referrals and stuff like that. Maybe I should stick with the frame. *sigh*
Posted: Wed Sep 16, 2009 8:21 pm
by GORDON
well, when i dumped frames from dtman i went to tables.
Posted: Wed Sep 16, 2009 8:25 pm
by thibodeaux
A div, maybe? And use javascript to update it? I know nothing.
Posted: Wed Sep 16, 2009 8:36 pm
by TPRJones
Hmmmmm, javascript ... maybe there's a script somewhere for a client-side include. Good idea!
I know nothing about javascript. Good time to learn.
Thanks!
Posted: Wed Sep 16, 2009 8:41 pm
by TheCatt
You could try sucking the webpage in via a http get request, then outputting the resulting HTML into the middle of your page dynamically, stripping out the redundant elements (html tags, head, body, etc... although you may need some elements of the head to present the stuff correctly)
Posted: Wed Sep 16, 2009 8:45 pm
by GORDON
TheCatt wrote:You could try sucking the webpage in via a http get request, then outputting the resulting HTML into the middle of your page dynamically, stripping out the redundant elements (html tags, head, body, etc... although you may need some elements of the head to present the stuff correctly)
"Head."
Posted: Wed Sep 16, 2009 9:02 pm
by TPRJones
GORDON wrote:TheCatt wrote:You could try sucking the webpage in via a http get request, then outputting the resulting HTML into the middle of your page dynamically, stripping out the redundant elements (html tags, head, body, etc... although you may need some elements of the head to present the stuff correctly)
"Head."
"sucking"
Posted: Wed Sep 16, 2009 9:04 pm
by TPRJones
TheCatt wrote:http get request
The head and body tags might be a problem, too much of a problem for my meager php skills. But I'll definitely keep that in mind if I can't find a satisfactory javascript client-side solution.
Posted: Wed Sep 16, 2009 9:05 pm
by GORDON
TPRJones wrote:GORDON wrote:TheCatt wrote:You could try sucking the webpage in via a http get request, then outputting the resulting HTML into the middle of your page dynamically, stripping out the redundant elements (html tags, head, body, etc... although you may need some elements of the head to present the stuff correctly)
"Head."
"sucking"
"stripping."
Catt is in a weird place tonight.
Posted: Wed Sep 16, 2009 9:18 pm
by TheCatt
TheCatt wrote:You could try sucking head, although you may need some head to[o]
better?
Posted: Wed Sep 16, 2009 11:20 pm
by GORDON
"outputting."