0

I want to simulate opening a url (ie www.website.com/page.php?data=something), but without actually opening a browser. I don't care if there is a response, so I don't need to handle that. Is there a simple way to do this?

EDIT: Alright, so I have made some progress, but nothing actually working. So far I have an AsyncTask to run this:

{
URL url = new URL("http://example.com/folder/file.php?PAYLOAD=stringOfText");
HttpURLConnection con = (HttpURLConnection) url.openConnection();
con.connect();
}

but nothing happens on the server side. For comparison, if I go to a browser and type the url in (http://example.com/folder/file.php?PAYLOAD=stringOfText), it responds as intended (that php generates another html file).

I'm not sure how to trouble shoot this at this point. I didn't use a lot of other code in httpUrlConnection because I wasn't using any return information.

sureshot007
  • 181
  • 1
  • 1
  • 7

0 Answers0