PDA

View Full Version : PHP with ASP Code


StatFox
01-29-2003, 11:52 AM
Hello everybody... I have a question that may seem pretty simple to the folks in here. I just can't figure it out.

Question:
My website uses .asp code to rotate banners on all of the pages. The .asp code doesn't function inside the .php page.

----------------------------------
Here is the general code we use for the banners...

If Request.ServerVariables("REMOTE_ADDR")="127.0.0.1" Or InStr(Request.ServerVariables("REMOTE_ADDR"),"localhost") Then
strAdRotSchedFile=PathToRoot & "/ads/main/topbanner.txt"
End If

Set adRotate=Server.CreateObject("MSWC.AdRotator")

strAdString=adRotate.GetAdvertisement(strAdRotSche dFile)

Set adRotate=nothing
Response.Write strAdString
%>
----------------------------------

Does anybody know how to make the .asp work in the .php environment? Thanks for your help! And let me know if there are any questions.

Icheb
01-31-2003, 09:18 AM
You can't have both asp and php code within one file.

Link14716
01-31-2003, 08:32 PM
You could always use an iFrame to pull it off. :)

StatFox
01-31-2003, 08:36 PM
I'm not familiar with the iFrame. Any place you can point me to get more info on that? Is it an easy process or complicated? Thank you!

saint_seiya
01-31-2003, 08:50 PM
Cant you dothe include with a javascript? IFRAME:


<iframe name="I1" src="yourpage.asp">
Your browser does not support inline frames or is currently configured not to display inline frames.
</iframe>

Icheb
02-01-2003, 07:42 AM
StatFox: google.com , always the fastest solution.