WTB: ASP to PHP

Discussion in 'Programming' started by Noddegamra, Nov 16, 2007.

  1. #1
    I have little to almost no knowlege of the ASP programming language. So, I'm going to need some help here.

    I need some ASP code to be translated to PHP for a prototype.

    THIS WILL BE PAID WORK


    You will need an understanding of sessions and web services (SOAP).


    Example Code Snippet:
    
    <%
    
    
    Sub CheckTicket(strTicket)
    	' nullify the ticket in session
    	Session(g_strTicket) = Null
    	Session(g_strUserName) = Null
    
    	' build SOAP request
    	Dim sRequest
    	sRequest = "<?xml version=""1.0"" encoding=""utf-8""?>" & _
    		"<soap12:Envelope xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:soap12=""http://www.w3.org/2003/05/soap-envelope"">" & _
    		"  <soap12:Body>" & _
    		"    <GetTicketInfo xmlns=""Site.CIP.WebServices"">" & _
    		"      <ticket>" & strTicket & "</ticket>" & _
    		"    </GetTicketInfo>" & _
    		"  </soap12:Body>" & _
    		"</soap12:Envelope>"
    
    	
    	Dim http
    	Set http = CreateObject("MSXML2.ServerXMLHTTP")
    	http.open "POST", g_strSVTicketWebServiceURL, False
    	http.setRequestHeader "Content-Type", "application/soap+xml; charset=utf-8"
    	http.setRequestHeader "Content-Length", Len(sRequest)
    	http.send sRequest
    
    	' check whether the return status is 'HTTP/1.0 200 OK'
    	If http.status <> 200 Then Exit Sub
    
    	' create XML document and load the SOAP result
    	Dim objXMLDoc
    	Set objXMLDoc = CreateObject("MSXML2.DOMDocument")
    	objXMLDoc.Async = False
    	objXMLDoc.LoadXml http.responseText
    
    	' check for a successful load of the XML Document
    	if objXMLDoc.ParseError.ErrorCode <> 0 then Exit Sub
    
    	' extract the ticket result
    	Dim Node
    	Set Node = objXMLDoc.documentElement.selectSingleNode("//soap:Envelope/soap:Body/GetTicketInfoResponse/GetTicketInfoResult")
    
    	' check whether ticket is correct
    	If Node.text <> "0" Then Exit Sub
    
    	' extract user information XML
    	Set Node = objXMLDoc.documentElement.selectSingleNode("//soap:Envelope/soap:Body/GetTicketInfoResponse/ticketInfo")
    	objXMLDoc.LoadXml Node.text
    
    	' check for a successful load of the XML Document
    	if objXMLDoc.ParseError.ErrorCode <> 0 then Exit Sub
    
    	' extract user role
    	Set Node = objXMLDoc.documentElement.selectSingleNode("//User")
    
            ' check user role
    	Dim iCurrentRole, sGroup
    	iCurrentRole = g_iRoleAny
    	sGroup = Node.Attributes.getNamedItem("AccessGroup").Text
            If sGroup = g_strGroupAdministrators Then
            	iCurrentRole = g_iRoleAdmin
            Else
            	iCurrentRole = g_iRoleBrowser
    	End If
    
            ' place the ticket and the current role into the session for future use
    	Session(g_strUserName) = Node.Attributes.getNamedItem("Name").Text
    	Session(g_strTicket) = strTicket
    	Session(g_strCurrentRole) = iCurrentRole
    End Sub
    
    ' 
    %>
    
    Code (markup):


    If you think you can take on this project, please let me know. I can send on further information for you to then send me a time estimate in which you can do it, and the price quote for doing the job.

    Thanks
     
    Noddegamra, Nov 16, 2007 IP
  2. kmap

    kmap Well-Known Member

    Messages:
    2,215
    Likes Received:
    29
    Best Answers:
    2
    Trophy Points:
    135
    #2
    hi

    How many such pages are

    I charge $20 per hour

    Regards

    Alex
     
    kmap, Nov 16, 2007 IP
  3. Noddegamra

    Noddegamra Peon

    Messages:
    1,013
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    0
    #3
    7 files are about 10 or so lines long. Header/Footer includes really. Simple.

    The file that actually does stuff is the main need for help. Which is about 250 lines. Although just over 100 are commented lines, and theres spacing included too, so not too much.

    8 files in total. I can only imagine it taking maybe 2 hours tops if you know both languages. I will have to send the files to people that respond to this topic to see what they think and get a best price and time :)
     
    Noddegamra, Nov 16, 2007 IP