Can i do this in PHP???

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
eshban
Forum Contributor
Posts: 184
Joined: Mon Sep 05, 2005 1:38 am

Can i do this in PHP???

Post 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
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Can i do this in PHP???

Post 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?
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: Can i do this in PHP???

Post by pickle »

It looks like you're just requesting a URL that returns XML. Is that correct?
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
eshban
Forum Contributor
Posts: 184
Joined: Mon Sep 05, 2005 1:38 am

Re: Can i do this in PHP???

Post 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?
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: Can i do this in PHP???

Post by pickle »

Just create a SimpleXML object with the URL as a parameter.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Post Reply