1

Strange question I know, but I'm developing a .net site, it's going to be pretty big so I'm not developing it in a language I am unfamiliar with (PHP).

The site needs to have it's PHPBB forum ported with it. I've looked at some .net forums but none are to the levels of maturity that the site requires.

Is it possible to somehow run a PHP script (the forum) in a .net page? I know the obvious answer is no don't be so stupid but just asking incase.

Some of the content on every page will be dynamically generated by .net and I'd rather not write all these template headers/footers in .net and PHP so they appear on each page correctly.

One possible solution I thought of was to request the forum php page somehow and print the returned HTML?

3
  • 1
    What about an IFrame, wouldn't that be easier than proxying all the php? Commented Feb 7, 2011 at 15:04
  • Possible duplicate: stackoverflow.com/questions/1060081/… Commented Feb 7, 2011 at 15:05
  • Iframe is something I've considered but I'd rather stay away from it if possible. Commented Feb 7, 2011 at 15:24

2 Answers 2

2

You can certainly run PHP on a IIS server, not sure which version you're using but I found that on 7.5 it's real easy to just use Microsoft Web Platform Installer which will not only install PHP for you (Type php in the search bar) but also supports auto-install of a bunch of open source PHP-based web apps. including PHPBB top of the list here... If you then turn around and do includes of the .NET headers/footers, the server will still compile the .NET parts as .NET and the PHP will simply include the parsed files.

Sign up to request clarification or add additional context in comments.

Comments

1

You could use the HttpWebRequest object to get the guts of the resultant page, but you'll run into problems in the functionality of the page since the .Net page running it all will not support the php calls natively. You would probably be better of using an iframe with some JavaScript to dynamically size the iframe window so as not to give the appearance of having an iframe present.

2 Comments

Thanks, that makes sense. Problem with an iframe though is it makes the forum pretty much unbookmarkable which is quite an issue.
@Tom Gullen - This could be overcome by using links that always target top and pass query string variables in that are then passed into the iframe's src tag to redirect to the appropriate page. Mixed with url re-writing (fun-fun), this could be made into a human readable construct. Inelegant perhaps, but that's a danger of mixing languages within sites.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.