Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Call another page in PHP

Status
Not open for further replies.

oaklanders

Technical User
Dec 9, 2007
38
Please advise how I can call ASP using PHP?

Code:
<html>
<body>

here is several paragraphs of information that changes alot and is stored in ASP.........
Anyway to call the ASP so I dont have to manually change my information everytime it is changed?
 
Two things come to mind
(1) Edit your php.ini so that APS pages are rendered by PHP as well
(2) Include the ASP page as needed

 
Thanks,

Where is the php.ini file located and what is the edit I need to make?
 
I have a Linux/Apache server and my php.ini is located in the root directory.
 
1 I think you would need to change how .asp is handled via IIS not the php.ini - could be wrong on this but the web server routes to the appropriate servinf module e.g. php or asp.dll in this instance. I suspect that's not what you want if you want your other .asp pages to continue.
However , what are you trying to do your first post is not clear. In general web pages are not bothered whatthe source language is in the link (or redirect) just takes a name.
 
to 'call' an asp file from a php script simply use file_get_contents() on the relevant file.

you will need to specify the http:// protocol in order to have the file parsed properly by IIS. so something like:

Code:
$contents = file_get_contents("[URL unfurl="true"]http://some.asp.server.com/path/to/file.asp");[/URL]
echo $contents;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top