Names Posted April 19, 2007 Posted April 19, 2007 I have downloaded and Installed OSC and would love to use it as a full solution, Problem is I have a Tiny bit of .ASP code that is esential to the site. I have tried to convert it using asp2php and others but to no avail. My need is to Query a remote system and then Parse the return which is returned in the URL---- My main question is, Can PHP parse like this, and who can help? I can handle tweaking OSC but writing code like this is beyond my scope right now. My HTML Site does it with the form posted below-- <% 'Comments about this page 'This page was created to display the surname search results. 'This ASP web page uses request.querystring to get the querystring values out of the URL(just in case you're not familiar with ASP web pages that have a file extension of .asp instead of .html). 'Example URL: http://support.swyrich.com/partner/p_searc...amp;searchType= 'Querystring Fields: 'numoforigins 'Used to get the number of origins available for the surname (if no value was passed, the name was not found. if more than 1 origin exists a drop down combo box/select control for users to change origins can be used) 'surname 'The surname that the user searched for. 'wordorigin 'The current origin returned. 'originword# 'For multiple origins available. Used in URL to change origins. Replace the # with a number less than or equal to the value passed in numoforigins. 'master# 'For multiple origins available. Used in URL to change origins. Replace the # with a number less than or equal to the value passed in numoforigins. 'origin# 'For multiple origins available. Used in URL to change origins. Replace the # with a number less than or equal to the value passed in numoforigins. 'originword# 'For multiple origins available. Used in URL to change origins. Replace the # with a number less than or equal to the value passed in numoforigins. 'hisdata 'Contains the history excerpt. 'motto 'Contains the motto(if exists). 'mottotranslated 'Contains the motto translation(if exists). 'crest 'Contains the Crest Description(if exists). 'coa 'Contains the Coat of arms Description(if exists). %> <form> <H1>Search Results</h1> <% if request.querystring("numoforigins") = "1" then response.write "<h3>Surname</h3>" response.write request.querystring("surname") response.write "<h3>Origin</h3>" response.write request.querystring("wordorigin") else if request.querystring("numoforigins") = "" then 'name not found response.write "<h3>Sorry The Name " & request.querystring("surname") & " was not found.</h3>" else response.write "<h3>Surname</h3>" response.write request.querystring("surname") response.write "<h3>Origin</h3>" response.write "<b>Note: </b>Be sure to replace 99999 with your licensee # in your source code<br>" response.Write "<select name='origin' size='1' ONCHANGE='if (this.form.origin.options[this.form.origin.selectedIndex].value) window.location.href=this.form.origin.options[this.form.origin.selectedIndex].va lue'>" & vbCRLF response.Write "<OPTION SELECTED>" & request.querystring("wordorigin") & "</OPTION>" & vbcrlf 'loops through all origins and adds to combobox and calls getsurnameinfo everytime combobox value changes for i = 1 to request.querystring("numoforigins") if request.querystring("wordorigin") <> request.querystring("originword" & i) then 'ensures no duplicate options put into combobox 'be sure to replace 99999 with your licensee # response.Write "<OPTION VALUE=""http://search.swyrich.com/searchresults.asp?Licensee=99999&surname=" & server.urlencode(request.querystring("surname")) & "&master=" & request.querystring("master" & i) & "&origin=" & request.querystring("origin" & i) & """>" & request.querystring("originword" & i) & "</OPTION>" & vbCRLF end if next response.Write "</select>" & vbCRF & " (" & request.querystring("numoforigins") & " origins available)" end if end if response.write "<h3>HisData</h3>" response.write request.querystring("hisdata") response.write "<h3>Motto</h3>" response.write request.querystring("motto") response.write "<h3>Motto Translated</h3>" response.write request.querystring("mottotranslated") response.write "<h3>Crest</h3>" response.write request.querystring("crest") response.write "<h3>COA</h3>" response.write request.querystring("coa") %> </form>
Recommended Posts
Archived
This topic is now archived and is closed to further replies.