I need to basically grab the source of the page as text. Then I can do
a replace() on the <link> tag. Then insert the text into an Iframe. In
theory, this I thought would be handled better server side. Is this
possible? I think the problem I'm having is that the domain I'm
requesting from is not the same domain as mine so their may be some
security issue. I also thought about injecting a link tag into the
iframe at the same time I load the HTML. Browsers load the last style
sheet on top of others. If I could just get the link tag into the
iframes contents right after I get the source text in there, it may
work. But there is also the issue of correctly assigning the classes
and I'd that are used in the iframe. Like
iframe.holder .someclassusedbythem {}
Or do I do?
iframe#holder .someclassusedbythem {}
Or
#holder .someclassusedbythem {}
Sorry if I'm OT with that.
Karl
Sent from losPhone
On Nov 1, 2010, at 11:50 PM, Nathan Nobbe <quickshiftin@xxxxxxxxx>
wrote:
On Sunday, October 31, 2010, ash@xxxxxxxxxxxxxxxxxxxx
<ash@xxxxxxxxxxxxxxxxxxxx> wrote:
This can only be done with javascript, as the iframe is client-
side, which php knows nothing about.
sounds to me like OP is building the page which will have the iframe
in it which means this is totally doable server side. in fact, id
almost prefer server side as that allows masking of the origin making
overriding css values easier afaict.
I am building a website for a tshirt company that uses another
company to get garments and promo items to print on.
The client wants to just have those pages load on top of their
website, but wants the layout to go with their look and feel. their
css.
We have the go ahead from the other companies to do so as well.
Karl,
this could be done server or client side, however the trouble is
altering the css for every page inside the iframe could be a real
pain. basically what you could do is act as a proxy, each 'page' from
the original site should be 'made a page' on your site. basically
youll have to change anchor tag href attributes so each request that
would go back to the original site goes through your site first. that
way youll have the chance to change the result before handing it back
to the client. also youll obviously need to change the url to css
file(s) per your primary requirement. if you do as i suggested above
and make the remote site appear as being served from your domain, you
should be able to get away w/ using a css file served from your domain
as well.
as one of my college professors used to say however, the devil is in
the details, mwahaha. i would recommend initially experimening to see
if you can use w/e look & feel customizations the remote site offers
to determine if embedding in the iframe w/o any proxy effort is
possible.
-nathan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php