Click to See Complete Forum and Search --> : Include ASP url in PHP?


theflyingminst
07-17-2008, 03:12 PM
Hi I have a dilemma, it's gonna sound strange but basically I need to include a url (http://..) in a .php file. The plot thickens though, it's an .asp file that the url is referencing if that makes any difference..

Thanks much!

Znupi
07-17-2008, 04:18 PM
Do you need to include() (http://php.net/include) it or just make a link to it?

theflyingminst
07-17-2008, 04:22 PM
Thanks for responding Znupi, include.

Znupi
07-17-2008, 04:39 PM
Well, it depends. Does that page output valid php code? When you visit that link do you see valid PHP code? or ASP code?

If it's PHP code, it's no problem, you can include it, just make sure you have the allow_url_fopen directive set to true in your php config.

If it's ASP code, from what I know you can't run ASP inside PHP. Unless you somehow configure IIS (which I never used) to parse files as both ASP and PHP.

theflyingminst
07-17-2008, 04:45 PM
Yeah it needs to output asp, so I guess it ain't happenin'.. Thanks so much!

sstalder
07-18-2008, 08:45 AM
It should work actually, if you include the ASP page the ASP will run before it hits the PHP side. PHP should see it as normal HTML content.

Assuming the ASP script is on a different server and not being run from the same directory as your PHP scripts.