| Forum Details |
Topics |
Posts |
| Categories |
| |
| 464 member(s) |
| 438,127 hit(s) |
| 14 categories |
| 48 topics |
| 26 messages |
| 0 online |
|
Forums: Unfiled
| download reporting |
|
|
September 30, 2008 3:26 AM
I need to know how the hostj2me server manages to log the mobile configuration, profile,and the model number of the phone which downloads a mobile application from its server....How is it possible to query the phone OTA.......
|
|
|
September 30, 2008 5:43 PM
HostJ2ME.com and WorldDeveloper.org use similar code to record application downloads and AMS notifications.
When your phone opens a connection to either server, it sends headers which contain the User-Agent. The servers record the all bytes from the connection and store them in a database. In some cases the IP addresses are resolved and the domains are normalized.
For AMS notifications, the server again records all bytes from the connection. Devices send status codes to the server. Below are some Java code excerpts.
download servlet:
StringBuffer buffer = new StringBuffer(); buffer.append(request.getRemoteAddr()); buffer.append("\nEncoding: "); buffer.append(request.getCharacterEncoding()); buffer.append("\nRemote user: "); buffer.append(request.getRemoteUser()); buffer.append("\nRemote host: "); buffer.append(request.getRemoteHost()); buffer.append("\n\n");
Enumeration e = request.getHeaderNames(); while (e.hasMoreElements()) { key = String.valueOf(e.nextElement());
if (key.toLowerCase().startsWith("cookie") || key.toLowerCase().startsWith("referer")) continue; buffer.append(key); buffer.append("="); buffer.append(request.getHeader(key)); buffer.append("\n"); }
e = request.getParameterNames(); while (e.hasMoreElements()) { key = String.valueOf(e.nextElement()); if (key.toLowerCase().startsWith("cookie") || key.toLowerCase().startsWith("referer")) continue; buffer.append(key); buffer.append("="); buffer.append(request.getHeader(key)); buffer.append("\n"); }
|
|