php question

Post Reply
TPRJones
Posts: 13418
Joined: Fri May 21, 2004 2:05 pm
Location: Houston
Contact:

Post 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?
"ATTENTION: Customers browsing porn must hold magazines with both hands at all times!"
TPRJones
Posts: 13418
Joined: Fri May 21, 2004 2:05 pm
Location: Houston
Contact:

Post 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.
"ATTENTION: Customers browsing porn must hold magazines with both hands at all times!"
GORDON
Site Admin
Posts: 56735
Joined: Sun Jun 06, 2004 10:43 pm
Location: DTManistan
Contact:

Post by GORDON »

There are frames on that page?
"Be bold, and mighty forces will come to your aid."
GORDON
Site Admin
Posts: 56735
Joined: Sun Jun 06, 2004 10:43 pm
Location: DTManistan
Contact:

Post by GORDON »

Oh, do you mean that button bar at the top?
"Be bold, and mighty forces will come to your aid."
TPRJones
Posts: 13418
Joined: Fri May 21, 2004 2:05 pm
Location: Houston
Contact:

Post 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
"ATTENTION: Customers browsing porn must hold magazines with both hands at all times!"
TPRJones
Posts: 13418
Joined: Fri May 21, 2004 2:05 pm
Location: Houston
Contact:

Post 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*
"ATTENTION: Customers browsing porn must hold magazines with both hands at all times!"
GORDON
Site Admin
Posts: 56735
Joined: Sun Jun 06, 2004 10:43 pm
Location: DTManistan
Contact:

Post by GORDON »

well, when i dumped frames from dtman i went to tables.
"Be bold, and mighty forces will come to your aid."
thibodeaux
Posts: 8121
Joined: Thu May 20, 2004 7:32 pm

Post by thibodeaux »

A div, maybe? And use javascript to update it? I know nothing.
TPRJones
Posts: 13418
Joined: Fri May 21, 2004 2:05 pm
Location: Houston
Contact:

Post 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!
"ATTENTION: Customers browsing porn must hold magazines with both hands at all times!"
TheCatt
Site Admin
Posts: 58739
Joined: Thu May 20, 2004 11:15 pm
Location: Cary, NC

Post 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)
It's not me, it's someone else.
GORDON
Site Admin
Posts: 56735
Joined: Sun Jun 06, 2004 10:43 pm
Location: DTManistan
Contact:

Post 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."
"Be bold, and mighty forces will come to your aid."
TPRJones
Posts: 13418
Joined: Fri May 21, 2004 2:05 pm
Location: Houston
Contact:

Post 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"
"ATTENTION: Customers browsing porn must hold magazines with both hands at all times!"
TPRJones
Posts: 13418
Joined: Fri May 21, 2004 2:05 pm
Location: Houston
Contact:

Post 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.
"ATTENTION: Customers browsing porn must hold magazines with both hands at all times!"
GORDON
Site Admin
Posts: 56735
Joined: Sun Jun 06, 2004 10:43 pm
Location: DTManistan
Contact:

Post 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.
"Be bold, and mighty forces will come to your aid."
TheCatt
Site Admin
Posts: 58739
Joined: Thu May 20, 2004 11:15 pm
Location: Cary, NC

Post by TheCatt »

TheCatt wrote:You could try sucking head, although you may need some head to[o]
better?
It's not me, it's someone else.
GORDON
Site Admin
Posts: 56735
Joined: Sun Jun 06, 2004 10:43 pm
Location: DTManistan
Contact:

Post by GORDON »

"outputting."
"Be bold, and mighty forces will come to your aid."
Post Reply