views:

113

answers:

2

I am creating a BlackBerry client and a PHP web service.

1) I want to send "hello world" from the BlackBerry to the php service. The service will respond with "hello world"
2) The BlackBerry will take that "hello world" from the php service and display it to the user.

+1  A: 

Consider looking at the PHP Documentation. PHP has AWESOME docs, and the code that you would use in the Blackberry browser is the same as the code that you would use on a desktop browser. Simply writing your application with desktop support would be sufficient, then all you need to do is style your app with something like CSS to look good on the tiny Blackberry screen.

As for a Hello World example, consider this code:

<?php

echo strip_tags($_REQUEST["foo"]);

Making the following request to this script:

http://example.com/whatever/the_script.php?foo=bar

would output bar in the browser. Changing bar in the request will change the output to the browser.

Hope this helps!

mattbasta
This information is not enough to make a webservic in php which will communicate with my Blackberry mobile and send and receive data (like Hello world string) to and from php page using webservice. please send me ource code for doing this ,both blackbery source code(client) and php code(server)
The PHP documentation is everything there is to know about PHP. And to top it off, the `$_*` superglobals are the only safe, normal way to import data in PHP. If this isn't sufficient, then PHP is the wrong language to be writing your application in. Also, this site isn't a way to get others to do your work for you. We're here to point you in the right direction, but we're not going to write a significant amount of source code for your personal benefit. You can look elsewhere for that.
mattbasta
A: 

This information is not enough to make a webservic in php which will communicate with my Blackberry mobile and send and receive data (like Hello world string) to and from php page using webservice. please send me ource code for doing this ,both blackbery source code(client) and php code(server)

you should be able to delete your own answer here, which would be the polite thing to do.
Michael Donohue