I want to write a desktop application that integrates with a web site(written in php),

- when the application is opened, the site can show this user is online
- User is able to send some request to another user
- e.g. user A press ‘request money’ user B is able to receive this requestuser B press ‘yes’ or ‘no’ to this request  user A receive ‘yes’ or ‘no’ answer
- when someone post an article in the php site, user can be notified

I don't know where to start so i'm stucked. Can anyone give me a direction?

I'm wondering do i need to write a server that communicates with the php web site? or I can directly connect the desktop application to the php site?