I have searched everywhere but I couldn't find my answer, is there a way to make a simple HTTP request? I want to request a PHP page / script on one of my websites but I don't want to show the webpage.
If possible I even want to do it in the background (in a BroadcastReceiver)
Best Answer
UPDATE
This is a very old answer. I definitely won't recommend Apache's client anymore. Instead use either:
Original Answer
First of all, request a permission to access network, add following to your manifest:
Then the easiest way is to use Apache http client bundled with Android:
If you want it to run on separate thread I'd recommend extending AsyncTask:
You then can make a request by: