Welcome to WebmasterWorld Guest from 54.198.185.204

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

calling cgi from php script

     
4:45 am on Aug 18, 2002 (gmt 0)

Preferred Member

10+ Year Member

joined:Aug 15, 2002
posts:450
votes: 0


Can you use fopen to open a URL pointing to a CGI script such that the cgi script is executed and you can still process the returned HTML normally? I guess the question is, does fopen execute the cgi script when it gets a pointer to the URL..

Thanks

6:43 am on Aug 19, 2002 (gmt 0)

Administrator

WebmasterWorld Administrator jatar_k is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:July 24, 2001
posts:15755
votes: 0


I don't think the script is executed using fopen() but the answer will be here.

fopen [php.net]

You may have to use require or include. I think there is even an exec function, not sure.

Sorry scorpion, I feel badly when I keep referring to this site but it really is that good.

2:00 pm on Aug 19, 2002 (gmt 0)

Preferred Member

10+ Year Member

joined:Aug 15, 2002
posts:450
votes: 0


thanks, I have written some code where fopen points to a cgi script. It seems to work in that fopen contains the returned HTML document. I assume for this to happen, it HAD to run the script, otherwise it wouldn't have gotten the html page...