1

I am a PHP developer, working on a site that will be communicating with another server with Apache Thrift API, so I want to know that is there some existing class or some way that I can use to communicate with Thrift API in PHP. I saw example written in Python that use Tsocket but I don't know whether PHP has Tsocket class or not. So if some one have done such work then please post some sample or tell about some class that I can use to implement thrift API client in PHP.

thanks in advance for everyone's effort.

Hafiz
  • 4,187
  • 12
  • 58
  • 111
  • don't even know what to try, I was going to use simple PHP Socket class but in thrift API's documentation they have written that most of languages have this Tsocket class that I tried to find on php.net to know about its methods but didn't find – Hafiz Nov 22 '11 at 17:36
  • 1
    its right here: http://php.net/fsockopen – Jan Dragsbaek Nov 22 '11 at 17:36
  • so this fsockopen is equivalent to TSocket of python, I should try this – Hafiz Nov 22 '11 at 17:39

1 Answers1

2

As posted in a comment, you should use fsockopen, as it provides a low-level access to sockets, just like pythons TSocket.

Jan Dragsbaek
  • 8,078
  • 2
  • 26
  • 46