Avatar of itdeptneci
 asked on

VB script on IIS to php on Apache

Does anybody have experience with PHP and VB. I've had a request for this small bit of code to be run on an Apache server. (Attached file shows full asp file)

            DT700Location = Cstr(.QueryString("DT700Location"))
            'ServerPageToFetch = Cstr(.QueryString("ServerPageToFetch"))
            ServerPageToFetch = ""
            'Test with fixed value DT700Location = ""
            strPOSTxml ="<DtermIPPush><PushItem type=""0"" URL=""" & ServerPageToFetch & """/></DtermIPPush>"

            dim xmlhttp
            set xmlhttp = server.Createobject("MSXML2.ServerXMLHTTP")
            xmlhttp.Open "POST", DT700Location, false
            xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
            xmlhttp.send strPOSTxml
Apache Web ServerMicrosoft IIS Web Server

Avatar of undefined
Last Comment
Steve Bink

8/22/2022 - Mon
Dave Baldwin

That's confusing.  What is supposed to run on IIS and what is supposed to run on Apache?  Note that POST and GET are HTTP protocols/commands and they work the same whether they come from ASP or PHP.

Sorry if there's any confusion.

That's my VB code that I have running happily on IIS.

I want the equivalent in PHP on Apache if it's possible?
Dave Baldwin

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question

Ok I'm being lazy not wanting to learn PHP. This really is a one off.

Is this easy in PHP? I just need an example for a PHP developer to understand my VB. It doesn't have to be bullet proof...

dim xmlhttp
set xmlhttp = server.Createobject("MSXML2.ServerXMLHTTP")
xmlhttp.Open "POST", "", false
xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
xmlhttp.send "<DtermIPPush><PushItem type=""0"" URL=""""/></DtermIPPush>"
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.