Cross-platform SDK and HTML5 tools for mobile app development
X
 

Communicating /w PHP

6 posts / 0 new
Last post
play
play's picture
Offline
Mobile Conjurer
Joined: 4 Mar 2010
Posts:
Communicating /w PHP

./

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Sam Pickard
rival's picture
Offline
Mobile Archmage
Joined: 19 Mar 2009
Posts:

Are you posting to the PHP script? If so, you format your POST string and write it to the connection.

I've not tested it, but it will be something like this.

HttpConnection* conn = new HttpConnection(this);
String myPostData = "user=rival&password=qwerty";

conn->create("http://myserver/myscript.php", HTTP_POST);
conn->setRequestHeader("content-type", "application/x-www-form-urlencoded");
conn->finish();

void myClass::httpFinished(HttpConnection* conn, int result)
{
  conn->write(myPostData.c_str(), myPostData.length());
}
play
play's picture
Offline
Mobile Conjurer
Joined: 4 Mar 2010
Posts:

./

Fredrik Eldh
Fredrik's picture
Offline
Mobile Sourcerer
Joined: 16 Feb 2009
Posts:

For graphics, I suggest you take a look at our tutorial: http://www.mosync.com/documentation/manualpages/graphics-primitives

play
play's picture
Offline
Mobile Conjurer
Joined: 4 Mar 2010
Posts:

./

Fredrik Eldh
Fredrik's picture
Offline
Mobile Sourcerer
Joined: 16 Feb 2009
Posts:

Sorry, I misunderstood. There is no alpha for regular drawing operations, except maDrawImage() and maDrawRGB(). Fonts use alpha too.