kenrbnsn Posted February 2, 2008 Share Posted February 2, 2008 Let's go back to square 1. How is the php script invoked? From what you've written, it's obvious that it's not being invoked from a web page. Once we know how it's being invoked, maybe then we can start attempting to solve your problem. Ken Link to comment https://forums.phpfreaks.com/topic/88839-getting-data-from-content-type-form-data-type-post/page/2/#findComment-455893 Share on other sites More sharing options...
CurtisM Posted February 2, 2008 Author Share Posted February 2, 2008 Let's go back to square 1. How is the php script invoked? From what you've written, it's obvious that it's not being invoked from a web page. Once we know how it's being invoked, maybe then we can start attempting to solve your problem. Ken The script is invoked when my game posts the data via winsock in multipart/form-data format. It gathers the data from the level/track that was last played and posts it to be added to a database. Link to comment https://forums.phpfreaks.com/topic/88839-getting-data-from-content-type-form-data-type-post/page/2/#findComment-455895 Share on other sites More sharing options...
kenrbnsn Posted February 2, 2008 Share Posted February 2, 2008 This game posts the data via winsock doesn't mean anything to me. What is your game written in? Is it running as on a web browser or is it a stand alone application? To me, winsock is a TCP/IP protocol, so you should be able to get a dump of whats coming across the wire some how. On UNIX/Linux you would use TCPDUMP. There may be something similar in the Windows world. When your game invokes the script how is it done? We need as many details as possible. Ken Link to comment https://forums.phpfreaks.com/topic/88839-getting-data-from-content-type-form-data-type-post/page/2/#findComment-455898 Share on other sites More sharing options...
CurtisM Posted February 2, 2008 Author Share Posted February 2, 2008 This game posts the data via winsock doesn't mean anything to me. What is your game written in? Is it running as on a web browser or is it a stand alone application? To me, winsock is a TCP/IP protocol, so you should be able to get a dump of whats coming across the wire some how. On UNIX/Linux you would use TCPDUMP. There may be something similar in the Windows world. When your game invokes the script how is it done? We need as many details as possible. Ken It is running as a stand alone application. I don't know the specifics, I didn't program the game, I am only making a Tournament Server for it. As for the Dump do you mean something along the lines of packets? The main problem here is that a normal post from the FF dev add-on works just fine but the game's doesn't and I am assuming it doesn't because of the way the data is sent in multipart. Sorry I can't give you more information, I didn't program the game and have no way to contact the developer. Link to comment https://forums.phpfreaks.com/topic/88839-getting-data-from-content-type-form-data-type-post/page/2/#findComment-455900 Share on other sites More sharing options...
trq Posted February 2, 2008 Share Posted February 2, 2008 If the game sends a valid http post request it will show up in php's $_POST array. How do you tell the game where your script is? Do you have any links we might be able to look at regarding the docs of said game? Link to comment https://forums.phpfreaks.com/topic/88839-getting-data-from-content-type-form-data-type-post/page/2/#findComment-455910 Share on other sites More sharing options...
CurtisM Posted February 2, 2008 Author Share Posted February 2, 2008 If the game sends a valid http post request it will show up in php's $_POST array. How do you tell the game where your script is? Do you have any links we might be able to look at regarding the docs of said game? These 2 lines: POST /highscore HTTP/1.1 Host: trials02.ifap4u.com:80 Tells it to post to "trials02.ifap4u.com/highscore" Sorry, but I don't. Link to comment https://forums.phpfreaks.com/topic/88839-getting-data-from-content-type-form-data-type-post/page/2/#findComment-455923 Share on other sites More sharing options...
kenrbnsn Posted February 2, 2008 Share Posted February 2, 2008 You may want to look at the HTTP functions in the manual, in particular http_parse_message(). I've never used them, so I can't give you any pointers. Ken Link to comment https://forums.phpfreaks.com/topic/88839-getting-data-from-content-type-form-data-type-post/page/2/#findComment-455925 Share on other sites More sharing options...
CurtisM Posted February 2, 2008 Author Share Posted February 2, 2008 You may want to look at the HTTP functions in the manual, in particular http_parse_message(). I've never used them, so I can't give you any pointers. Ken I do not have the ability to add PHP extensions :-\ I may have to do this in another language then pass it with a variable :-\ Link to comment https://forums.phpfreaks.com/topic/88839-getting-data-from-content-type-form-data-type-post/page/2/#findComment-455948 Share on other sites More sharing options...
CurtisM Posted February 2, 2008 Author Share Posted February 2, 2008 Still no ideas? Link to comment https://forums.phpfreaks.com/topic/88839-getting-data-from-content-type-form-data-type-post/page/2/#findComment-456223 Share on other sites More sharing options...
kenrbnsn Posted February 3, 2008 Share Posted February 3, 2008 If you're getting the data, write your own parser in PHP. Ken Link to comment https://forums.phpfreaks.com/topic/88839-getting-data-from-content-type-form-data-type-post/page/2/#findComment-456706 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.