Jump to content

Getting data from "Content-type: form-data;" type post


CurtisM

Recommended Posts

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

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.

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

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.

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.

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  :-\

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.