I have something set up on our server so that whenever you visit that page, if your GET request is set up right, it adds an entry to the database, marking who and when. I'm designing a system showing whether our devices are communicating, and I want to set it up so that it will automatically do that every hour.
So, if I put in something like "http://example.com/stamptime/default.aspx?playerId=3191121" into my web browser, it'll add an entry to the database.
I've been looking for a way to do that without the browser. If I open it as a web page, it works perfectly. If I try this:
URL url = new URL("http://example.com/StampTime/Default.aspx?playerId=3191121"); HttpURLConnection con = (HttpURLConnection) url.openConnection(); con.setRequestMethod("GET"); con.connect(); the database doesn't get anything added to it.
Is there something I'm missing here?