I’m not sure about what stream wrapper means, even with the php manual.
But it seems that if we use it, we need to establish the connection on a specific way. Well… on this case, only TCP/IP socket connections are allowed by the server.
Well… but we are getting off-topic. I will post specific questions when I start creating this EPP Protocol php Class. (this sounds really fancy , shame that I know so little about it).
$xml = simplexml_load_file("test.xml");
//and... here we goo...
Well, I’m not yet sure what best fits here.
The task that I have in hands is more or less like this:
Receive a frame from the server:
Remove the initial 4 bytes (that contain the length of the frame),
Read the XML that is returned.
Send a frame to the server:
Construct (or open) a XML file;
Adding the fields on specific nodes based on some rules.
Save or end the construction of the XML file.
Add the 4 bytes with the length and send the frame.
The frame, is the sum of:
the initial 4 bytes (containing the frame length, including this 4 bytes) + XML syntax.
And it’s according to this scenario that I’m not sure about what direction should I take.
I like HereDoc syntax for large sections of multiline output; Sometimes I use the C-style printf() function, othertimes HereDoc. I never come OUT of PHP unless I’m in a template file.