Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

carlosl3g

macrumors newbie
Original poster
Oct 21, 2008
10
0
Hi, I'm starting developing for the iPhone platform and I have a difficult task to do:

I have to find the way to send images from iPhone to a MySQL database in a server in the Internet.
The server side code is written whit PHP and iPhone platform does not have support for PHP neither for MySQL.

I have to make Objective-C code with this php functionality:



mysql_connect('127.0.0.1', 'databaseName', 'psw');
mysql_select_db("databaseName");
$answer = mysql_query("SELECT COUNT(*) AS number_kby FROM kby") or die(mysql_error());
$data = mysql_fetch_array($answer);
$new_kby_number = $data['number_kby'] + 1;
.
.
.
.
.
.
.
.

$answer = mysql_query("INSERT INTO kby VALUES(' ',' ')");


move_uploaded_file($_FILES['myfile']['tmp_name'], 'pictures/image'.$new_kby_number.'.png');
mysql_close();

?>

My question is:
If the only way to send data is by web services,

Which services are those?
Is it an option to use XML parsing?
Where should I start to look for the solution?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.