Re: include html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 1, 2010 at 11:22 PM, Karl DeSaulniers <karl@xxxxxxxxxxxxxxx>wrote:

> 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?


yes, there are a few options, fopen wrappers, curl or raw sockets all come
to mind.  fopen wrappers sound like they may be easiest for you.


> 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.


right, this is why you would setup a server side proxy, to avoid client side
cross domain security restrictions, however you'll have to change all the
instances of the remote domain to your domain, and ensure that your server
actually is able to fulfill requests for those resources.


> I also thought about injecting a link tag into the iframe at the same time
> I load the HTML.


when you say link tag are you talking about <a> tags?  you lost me on this
last line here.


> Browsers load the last style sheet on top of others.


this is true, but i doubt you'll be able to have it load a css file from
your domain atop a css file from a remote domain.


>  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.
>

shrug, no worries, but im too lazy to dig into the details of client side
options. :)

-nathan

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux