Jump to content

PHP cURL - Packet Sending to Remote C# Application via TCP


Vorspire

Recommended Posts

Hey guys, this is my first post here :)

 

After a few hours of searching google for answers, I have come up empty-handed on this matter. (Whether that's due to irrelivant search terms or not I'm not sure)

 

OK, so the main question...

 

Is it entirely possible/plausible to be able to send a custom packet consisting of the following:

 

4 byte packet ID (integer 32)

X byte username (string)

X byte password (string)

 

...Using PHP-cURL?

 

If this IS possible, what would the best method be to do this and how would I be able to parse the data response from my remote C# application?

 

The reason for using cURL is that my web-host has disabled the use of sockets due to security risks (lol).

 

----------

 

To explain simply what I am trying to do;

 

I have a remote C# .NET 3.5 application (MMORPG server/emulator) fitted with a sturdy and secure Listener and Packet Handler. The response I am trying to get from my server is simply the status, like how many players are currently connected, memory usage, etc. Everything is already coded and set-up on the C# app ready for receiving my custom packet.

So all I need to do now is find a way via PHP to send the request packet to my application and retrieve/parse the resulting data.

 

----------

 

Any help on this matter is greatly appreciated and I look forward to becoming an active member of this community :D

 

Regards,

Vorspire

Link to comment
Share on other sites

Damn, that is bad...

 

If I can't get my web-host to white-list my dedicated server address for use with sockets, then I may have to impliment the HTTPListener class in my application to directly handle http requests to the remote server IP.

 

This way, I should be able to simply type my remote server IP into any browser address bar and have the web-page automatically generated upon URI request... If I can do that, then I guess it won't be so hard to simply output an XML datasheet and parse it with PHP.

 

Thanks for the input anyhow :)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.