im posting from iphone to php server file that will write to mySQL db. Ive got the post in %20 format and it looks like this:
status:tagid=F6869FB4,latitude=37.331689,longitude=-122.030731
but im not sure how to post it. Ive got the manual user input form.html laid out and the corresponding write.php file. But the values are not getting posting, how should i encode them or format them for the write.php file to receive them?
post from iphone to php
Moderator: General Moderators
Re: post from iphone to php
You can use the header() function to post data.
Code: Select all
$req = "yourdatahere";
header("POST /yourscript.php HTTP/1.0");
header("Host: http://www.yourdomain.com");
header("Content-Type: application/x-www-form-urlencoded");
header("Content-Length: " . strlen($req));
header($req);Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
Re: post from iphone to php
scottayy wrote:You can use the header() function to post data.
Code: Select all
$req = "yourdatahere"; header("POST /yourscript.php HTTP/1.0"); header("Host: http://www.yourdomain.com"); header("Content-Type: application/x-www-form-urlencoded"); header("Content-Length: " . strlen($req)); header($req);
Hmm...No sure what you mean. Im sending info from the iphone to the php file that writes to mySQL...