简体   繁体   English

PHP客户端与Apache Thrift API通信

[英]PHP client to communicate with Apache Thrift API

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. 我是一名PHP开发人员,正在一个将与使用Apache Thrift API与另一台服务器通信的站点上工作,因此我想知道是否存在一些现有的类或某种方法可以用来与PHP中的Thrift API进行通信。 I saw example written in Python that use Tsocket but I don't know whether PHP has Tsocket class or not. 我看到了使用Tsocket用Python编写的示例,但我不知道PHP是否具有Tsocket类。 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. 因此,如果有人完成了这些工作,请发布示例或告诉我可以用于在PHP中实现Thrift API客户端的类。

thanks in advance for everyone's effort. 在此先感谢大家的努力。

如评论中所述,您应该使用fsockopen ,因为它提供了对套接字的低级访问,就像python TSocket一样。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM