Vorspire Posted September 12, 2009 Share Posted September 12, 2009 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 Regards, Vorspire Link to comment https://forums.phpfreaks.com/topic/174003-php-curl-packet-sending-to-remote-c-application-via-tcp/ Share on other sites More sharing options...
corbin Posted September 12, 2009 Share Posted September 12, 2009 cURL is made for common protocols like HTTP and FTP.... I don't think cURL can handle custom data. Too bad socket functions are disabled, because it would be quite easy otherwise. Link to comment https://forums.phpfreaks.com/topic/174003-php-curl-packet-sending-to-remote-c-application-via-tcp/#findComment-917238 Share on other sites More sharing options...
Vorspire Posted September 12, 2009 Author Share Posted September 12, 2009 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 https://forums.phpfreaks.com/topic/174003-php-curl-packet-sending-to-remote-c-application-via-tcp/#findComment-917254 Share on other sites More sharing options...
gizmola Posted September 12, 2009 Share Posted September 12, 2009 Under the circumstances, I think it's a good idea for you to implement the HTTP Listener. It makes your server easier to work with. Link to comment https://forums.phpfreaks.com/topic/174003-php-curl-packet-sending-to-remote-c-application-via-tcp/#findComment-917260 Share on other sites More sharing options...
Vorspire Posted September 12, 2009 Author Share Posted September 12, 2009 Success! I have successfully implimented the HTTP Listener, heading on to impliment the PHP back-end for parsing the XML datasheet. Will check back here if I have any problems Thanks again. Link to comment https://forums.phpfreaks.com/topic/174003-php-curl-packet-sending-to-remote-c-application-via-tcp/#findComment-917272 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.