Page 1 of 1

Can i do this in PHP???

Posted: Wed Jul 29, 2009 12:14 am
by eshban
Hi,

I want to know that whether i am able to implement that functionality in PHP or not. Here is my requirement


1) The website will send a request to an IP address (Debian box port 9005) and update the results after every minute
2) The machine(debian box) will provide xml data in response of your request
Here is the procedure to send and receive request

(a) open a socket for the IP & Port
(b) read the 1st 4 bytes to determine the length of the content.
(c) read the content with the server's response length -> this is your response

The current system is working on JAVA technology.

Can i implement the same task in php

Waiting for suggestions

Eshban

Re: Can i do this in PHP???

Posted: Wed Jul 29, 2009 12:28 am
by requinix
Yeah, you can do it. Well... I mean to say, it's possible. As for whether you'll do it yourself that remains to be seen.

You tried to figure it out yourself yet?

Re: Can i do this in PHP???

Posted: Wed Jul 29, 2009 2:42 pm
by pickle
It looks like you're just requesting a URL that returns XML. Is that correct?

Re: Can i do this in PHP???

Posted: Thu Jul 30, 2009 2:39 am
by eshban
Hi pickle,

you are right, my purpose is to just requesting a URL that returns XML and update my CHARTS.

So what you suggest?

Re: Can i do this in PHP???

Posted: Thu Jul 30, 2009 9:44 am
by pickle
Just create a SimpleXML object with the URL as a parameter.