Hello,
Was wondering if someone could point me in the direction of how to accomplish opening an tunnel in php. We have a website where the frontend is in asp and the backend is php hosted on seperate machines in different locations. We need to be able to open a php http tunnel to feed the front end with material from a different location. If I wasn't clear enough I will gladly try to provide more information.
Thank you in advance.
Here is an example in asp
Code:
Function XML_readTunnel(ByVal URL_Value)
' This function will open an xml tunnel with the given URL_Value String argument.
Dim Result
Dim objHTTP
Dim searchFor
searchFor = "?"
Result = ""
If Instr(URL_Value, searchFor) >= 1 Then URL_Value = URL_Value & "&" Else URL_Value = URL_Value & "?"
URL_Value = URL_Value & "DT=" & server.urlencode(TIME)
Set objHTTP = Server.CreateObject ("Microsoft.XMLHTTP")
objHTTP.open "GET", URL_Value, False
objHTTP.send
If Not IsEmpty(objHTTP.responseBody) Then
Result = objHTTP.responseText
End If
Set objHTTP=nothing
XML_readTunnel = result
End Function