LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   php http tunneling (https://www.linuxquestions.org/questions/programming-9/php-http-tunneling-485001/)

lord-fu 09-19-2006 11:33 AM

php http tunneling
 
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


lord-fu 09-19-2006 11:36 AM

Sorry, for the quick repost, I thik I have my answers but I would still appreciate comments. Thanks again.

My answers were found here:
http://us2.php.net/


All times are GMT -5. The time now is 12:17 AM.