Forum Moderators: coopster

Message Too Old, No Replies

Including vs activating .cfm in PHP scripts

Problem with cookie access

         

DocJJ

10:05 pm on Feb 8, 2006 (gmt 0)

10+ Year Member



In a php script:

Case 1. <a href=http://www.test.com/test.cfm>

works as expected, however

Case 2. include "http://www.test.com/test.cfm"

doesn't.

Cookies that were accessible in Case 1 aren't accessible in Case 2.

Please explain.

coopster

10:09 pm on Feb 8, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld, DocJJ.

There are no cookies on the server. Cookies are in a browser.

DocJJ

2:13 pm on Feb 9, 2006 (gmt 0)

10+ Year Member



Coopster - Thanks.

I'm trying to reuse old .cfm script within this PHP script. The .cfm script was originally "included" in a primary .cfm script and variables and url parameters were available to the included .cfm script.

Using the local file version of the "include" wouldn't work, so I tried the full url version of the "include", which ran the application.cfm script causing cookie access problems.

Any suggestions?

coopster

2:54 pm on Feb 9, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Well, there is always the "imitate a browser" option. Basically you open a socket to the script and send the appropriate headers (including your cookie values) and then read the response back.

fsockopen [php.net]