Passing variables from a PHP page to an ASP page?

Passing variables from a PHP page to an ASP page?

am 07.12.2005 02:57:51 von FayeC

Here's a question for you:
I have a site using a PHP CMS and I need it to use an ASP module from
another site but I would like to use a frame so it looks like it is
still in the same site.
I need to pass a username variable from a form in in the PHP webspace
(where the domain is pointing) to a page in an ASP webspace (using a
subdomain not related to the main domain).
I created a frame page in the php hosting with a 1px top frame and the
main frame pointing to the asp page but of course the variable is not
being passed.....if I put the ASP connection code on the frameset page
it doesn't recognize it because the hosting is a Unix/PHP hosting
only.
My question to you is:
Can a variable be passed from the php to the ASP webspace using some
other technique?
I just need to have the ASP module showing as if it is in the PHP.....

Thanks,

FayeC

Re: Passing variables from a PHP page to an ASP page?

am 07.12.2005 04:14:21 von Mike Willbanks

How about using cUrl to fetch the page and then display it...


> Here's a question for you:
> I have a site using a PHP CMS and I need it to use an ASP module from
> another site but I would like to use a frame so it looks like it is
> still in the same site.
> I need to pass a username variable from a form in in the PHP webspace
> (where the domain is pointing) to a page in an ASP webspace (using a
> subdomain not related to the main domain).
> I created a frame page in the php hosting with a 1px top frame and the
> main frame pointing to the asp page but of course the variable is not
> being passed.....if I put the ASP connection code on the frameset page
> it doesn't recognize it because the hosting is a Unix/PHP hosting
> only.
> My question to you is:
> Can a variable be passed from the php to the ASP webspace using some
> other technique?
> I just need to have the ASP module showing as if it is in the PHP.....
>
> Thanks,
>
> FayeC

Re: Passing variables from a PHP page to an ASP page?

am 07.12.2005 05:19:24 von FayeC

Hmmmmmm.....I have no clue on how to do that but that's a tip.....off
to get googling....
Any more info??

FayeC

On Tue, 06 Dec 2005 21:14:21 -0600, Mike Willbanks
wrote:

>How about using cUrl to fetch the page and then display it...
>
>
>> Here's a question for you:
>> I have a site using a PHP CMS and I need it to use an ASP module from
>> another site but I would like to use a frame so it looks like it is
>> still in the same site.
>> I need to pass a username variable from a form in in the PHP webspace
>> (where the domain is pointing) to a page in an ASP webspace (using a
>> subdomain not related to the main domain).
>> I created a frame page in the php hosting with a 1px top frame and the
>> main frame pointing to the asp page but of course the variable is not
>> being passed.....if I put the ASP connection code on the frameset page
>> it doesn't recognize it because the hosting is a Unix/PHP hosting
>> only.
>> My question to you is:
>> Can a variable be passed from the php to the ASP webspace using some
>> other technique?
>> I just need to have the ASP module showing as if it is in the PHP.....
>>
>> Thanks,
>>
>> FayeC

Re: Passing variables from a PHP page to an ASP page?

am 07.12.2005 09:15:02 von nc

FayeC wrote:
>
> I have a site using a PHP CMS and I need it to use an ASP module
> from another site but I would like to use a frame so it looks like it is
> still in the same site.
> I need to pass a username variable from a form in in the PHP webspace
> (where the domain is pointing) to a page in an ASP webspace (using a
> subdomain not related to the main domain).

There's one missing piece in your description of the problem. Will the
ASP page accept a GET variable or does it have to be POST?

In the first case, everything can be done rather simply; you put out a
frameset that looks something like this:






src="http://othersite.com/otherscript.asp?user=FayeC">




The second case is mucn more complicated...

Cheers,
NC

Re: Passing variables from a PHP page to an ASP page?

am 07.12.2005 19:04:22 von shabbir.bharmal

you can pass variables by using query string
http://othersite.com/otherscript.asp?user=FayeC to asp page and then
over then you can retrieve it by either:
u=request('user')
or
u=request.querystring('user')

Re: Passing variables from a PHP page to an ASP page?

am 08.12.2005 01:50:43 von FayeC

Nope....it has to be POST. The variable is coming from a form on an
html page hosted on a UNIX/PHP server and is linking to a page on the
ASP hosting space.
I just wanted to make it look seamless by cloaking the second
subdomain.
I am not that experienced in PHP to smack a cURL script....I was
reading on it and I found out that the PHP hosting does support it.

FayeC

On 7 Dec 2005 00:15:02 -0800, "NC" wrote:

>FayeC wrote:
>>
>> I have a site using a PHP CMS and I need it to use an ASP module
>> from another site but I would like to use a frame so it looks like it is
>> still in the same site.
>> I need to pass a username variable from a form in in the PHP webspace
>> (where the domain is pointing) to a page in an ASP webspace (using a
>> subdomain not related to the main domain).
>
>There's one missing piece in your description of the problem. Will the
>ASP page accept a GET variable or does it have to be POST?
>
>In the first case, everything can be done rather simply; you put out a
>frameset that looks something like this:
>
>
>
>
>
>
> >src="http://othersite.com/otherscript.asp?user=FayeC">
>
>
>
>
>The second case is mucn more complicated...
>
>Cheers,
>NC

Re: Passing variables from a PHP page to an ASP page?

am 08.12.2005 10:54:30 von Colin Fine

FayeC wrote:
> Nope....it has to be POST. The variable is coming from a form on an
> html page hosted on a UNIX/PHP server and is linking to a page on the
> ASP hosting space.
> I just wanted to make it look seamless by cloaking the second
> subdomain.
> I am not that experienced in PHP to smack a cURL script....I was
> reading on it and I found out that the PHP hosting does support it.
>

What is being hosted on what system is really beside the point.

A frame is no different from any other page - you can only communicate
to it via HTTP/HTML. If the frame content is to be specified by a link
it will be retrieved by GET so you can use CGI arguments, but there's no
way of giving it POST data. But there's nothing to stop you using a form
to specify the frame, if this fits your user interaction model. Just
give a TARGET parameter to the FORM statement as well as the ACTION and
METHOD parameters.

Of course what I said above isn't quite true any more, since the
invention of cookies. Cookies are client side, so it's perfectly
possible for your calling script to weasel away any information in
cookies in the browser, and the called script in the frame to read them.
But I get the impression that your ASP script is a given, in which case
the FORM method above is the only way I can think of.

Colin