Forum Moderators: coopster

Message Too Old, No Replies

Parsing Url to rewrite Iframe URL within a php page...help a php n00b

         

Foxone

10:16 pm on Dec 16, 2003 (gmt 0)

10+ Year Member



Ok I know this sound complicated but I just started PHP so be kind :)

I have a Domino server that send me a link like

[machine.company.com...]
this opens a notes view that is plain

Now on another machine I have a php page that has a nice header, content, footer AND an Iframe that points to the machine above.
The php page is on lets say [machine2.company.com...]

So...I would like to be able to go to:

[machine2.company.com...]

and have the forms.php page parse the url and replace the URL of the Iframe with the url it just parsed...basically rewritting the address of the Iframe inside the php depending on what the php is being sent.

I am not sure if I am explaining myself well...sorry for that but I just started with php and this is wayyy above what I learned so far.

Do you guys know if this is possible and how to do it?

coopster

10:36 pm on Dec 16, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld, Foxone!

I think I know what you are getting at...have you had a look at the PHP include [php.net] function yet? You may have to treat that url being passed a bit differently, possibly urlencode [php.net] it or something to that effect.

Related information:
Help w/PHP script passing query strings [webmasterworld.com]
Passing an argument with & in the URL [webmasterworld.com]

Foxone

1:15 am on Dec 17, 2003 (gmt 0)

10+ Year Member



Thanks for the quick reply.

Here is what I think needs to happen:

the forms.php parses what is after the? and assigns what it finds to an array like URL=machine.company.com/domino/pageXYZ123

then the page has within itself a reference to an Iframe or Include (I already use includes for the Header/footer etc... and just echo the URL of the Iframe as [machine.company.com...]

Basically anything that is after the? on the address becomes the URL of the Inlude/iframe

So I need to make the Href of the Iframe as the Array that is being parsed? Am I right?

I just started learning Php this week so anybody who can direct me to some sample code or a script (hotscripts.com?) that would do this would help me (saving time)

Sorry for the n00b question but I am not a programmer so php is scary to start learning