Board index   FAQ   Search  
Register  Login
Board index PHP PHP Scripts

Help Converting VBScript to PHP

Links for php scripts

Moderators: macek, egami, gesf

Help Converting VBScript to PHP

Postby yodajones » Sun Jun 05, 2011 8:24 am

I have a old VBScript that I would like to convert into a PHP script. The VBScript looked at incoming requests and diverted them to the appropriate websites which were hosted on a bulk virtual server.
I would like to convert this script to PHP and re-use it on a new server.

The file was called "default.asp" so I need to have a new file called default.php or index.php.

The default.asp file contained this VBScript:

Code: Select all
<%@ Language=VBScript %>
<% if instr(Request.ServerVariables("SERVER_NAME"), "domain-a.com") > 0 then%>
<!--#include virtual="d-a.asp"-->
<% elseif instr(Request.ServerVariables("SERVER_NAME"), "domain-b.com") > 0 then%>
<!--#include virtual="d-b.asp"-->
<% elseif instr(Request.ServerVariables("SERVER_NAME"), "domain-c.com") > 0 then%>
<!--#include virtual="d-c.asp"-->
<%end if%>


If someone could help me that would be great.

Thank you.
yodajones
New php-forum User
New php-forum User
 
Posts: 1
Joined: Sun Jun 05, 2011 8:21 am

Re: Help Converting VBScript to PHP

Postby kristy85 » Mon Dec 05, 2011 11:20 pm

Hello,

I have a old VBScript that I would like to convert into a PHP script. The VBScript looked at incoming requests and diverted them to the appropriate websites which were hosted on a bulk virtual server.
I would like to convert this script to PHP and re-use it on a new server.

The file was called "default.asp" so I need to have a new file called default.php or index.php.

The default.asp file contained this VBScript:
<%@ Language=VBScript %>

<% if instr(Request.ServerVariables("SERVER_NAME"), "domain-a.com") > 0 then%>

<!--#include virtual="d-a.asp"-->

<% elseif instr(Request.ServerVariables("SERVER_NAME"), "domain-b.com") > 0 then%>

<!--#include virtual="d-b.asp"-->

<% elseif instr(Request.ServerVariables("SERVER_NAME"), "domain-c.com") > 0 then%>

<!--#include virtual="d-c.asp"-->

<%end if%>

If someone could help me that would be great.

Thank you.

web site development services | Web development company
kristy85
New php-forum User
New php-forum User
 
Posts: 2
Joined: Sun Nov 13, 2011 10:53 pm


Return to PHP Scripts

Who is online

Users browsing this forum: Google Feedfetcher and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.