[英]How can I send XML to a TCP port and have a conversation there using php?
I'm trying to use the XML API for Cisco IOS XR (Docs: Cisco IOS XR XML API Guide, Cisco IOS XR Release 4.1 ) but I'm not sure what library to use in PHP (simpleXML?) to just open a TCP connection to a port on a device and start reading and writing XML to it. 我正在尝试将XML API用于Cisco IOS XR(文档: Cisco IOS XR XML API指南,Cisco IOS XR版本4.1 ),但是我不确定要在PHP中使用哪个库(simpleXML?)来打开TCP连接到设备上的端口,然后开始向其中读取和写入XML。
I understand the concept of the schemas and such, but everything I can find about PHP and XML seems to be oriented towards web services, POST, etc, and this is simply reading and writing XML. 我了解模式等的概念,但是我能找到的有关PHP和XML的所有内容似乎都是针对Web服务,POST等的,而这仅仅是读写XML。
What you mean is opening, reading and writing to a socket . 您的意思是打开,读取和写入套接字 。 Read the documentation on this subject for more information.
阅读有关此主题的文档以获取更多信息。 The xml is just an accessory to your actual communications, which will happen, one way or another, via sockets .
xml只是您实际通信的附件,它将通过套接字以一种或多种方式发生。
EDIT : And thus you will not need any library since sockets are part of php by default. 编辑 :因此,由于默认情况下套接字是php的一部分,因此您将不需要任何库。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.