473,387 Members | 1,548 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How to view the header that ones client / browser generates?

Hi group,
I'm doing an internetclient via cellphone/gprs that sends a request to html
sites.
The client I've made work great on all sites......except the only site where
I need it :-/

I guess that the problem is that my website host have a firewall, or maybe
just some serversettings, that inhibits my client from getting the site I
request.

What I now need to do is following
Checkking the header that my clientapplication generates, to see how it
differes from headers generated by normal clients, such as inet explorer and
so on.

Are there any site I can request, and see the header I requested with? A
mailback service would be the best, as I receive the response as a
textstream.

Thanks in advance
Adrian
Jul 17 '05 #1
4 1686
"Adrian Hjelmslund" <Ne**@hjelmslund.dk> wrote in message
news:rb******************@news.get2net.dk...
Hi group,
I'm doing an internetclient via cellphone/gprs that sends a request to html sites.
The client I've made work great on all sites......except the only site where I need it :-/

I guess that the problem is that my website host have a firewall, or maybe
just some serversettings, that inhibits my client from getting the site I
request.

What I now need to do is following
Checkking the header that my clientapplication generates, to see how it
differes from headers generated by normal clients, such as inet explorer and so on.

Are there any site I can request, and see the header I requested with? A
mailback service would be the best, as I receive the response as a
textstream.

Thanks in advance
Adrian


Why not write a simple socket server that will print everything it gets,
byte for byte, to System.out or a file? It takes maybe 30 lines of code.
I've probably got one lying around somewhere.
Jul 17 '05 #2
> Why not write a simple socket server that will print everything it gets,
byte for byte, to System.out or a file? It takes maybe 30 lines of code.
I've probably got one lying around somewhere.


Oh, a misunderstanding here :o)
I'm generating the client request (I have no control over the header I send
though) and I need to see the header of my own request that I send to the
server. I have no access to the server unfortunately :-(
Best regards
Adrian
Jul 17 '05 #3
"Adrian Hjelmslund" <Ne**@hjelmslund.dk> wrote in message
news:tM******************@news.get2net.dk...
Why not write a simple socket server that will print everything it gets,
byte for byte, to System.out or a file? It takes maybe 30 lines of code.
I've probably got one lying around somewhere.
Oh, a misunderstanding here :o)
I'm generating the client request (I have no control over the header I

send though) and I need to see the header of my own request that I send to the
server. I have no access to the server unfortunately :-(
Best regards
Adrian

No, that's what I mean. Write a simple server, and tell your client to
connect to that server, and basically the server will just echo everything
it gets from the client so you can examine it. Something like:

import java.net.*;
import java.io.*;

public class EchoServer {

private int port = 8081;

public EchoServer() {
try {
ServerSocket serverSocket = new ServerSocket(port);
Socket client = serverSocket.accept();
InputStream in = client.getInputStream();
int data;
while ((data = in.read()) != -1) {
System.out.print((char) data);
}
} catch (Exception e) {
e.printStackTrace();
}
System.out.println("---------------- Done");
}

public static void main(String[] args) {
EchoServer es = new EchoServer();
}
}

Understand that I just jotted that down on the spot, no references or
anything, so I can guarantee it will work. It's the general idea though.
Then just run this, and take your client and point it at
http://localhost:8081 (If that port is taken, just change it in the
program.)
Jul 17 '05 #4
Thanks Ryan,
Was just what I needed :-)
Jul 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: mike | last post by:
ok here's the problem: I have a page that displays a form for user to select individual fields and to specify their own criteria which is used to query a database and then create an excel...
18
by: chris | last post by:
I'd like to initiate a php script using a standard httpd request, but then allow the client browser to disconnect without terminating the script. Freeing up the browser to access other functions...
4
by: MacDermott | last post by:
I have an Access 2000 form with a subform in Datasheet view. When I click on an item in the header of the subform (the title at the top of one of the columns), I'd like to be able to capture the...
0
by: Lokkju | last post by:
I am pretty much lost here - I am trying to create a managed c++ wrapper for this dll, so that I can use it from c#/vb.net, however, it does not conform to any standard style of coding I have seen....
3
by: Guadala Harry | last post by:
Is it possible to view the contents of an external CSS style sheet that is referenced from any web page being viewed in the browser (IE6)? If so how? The css file physically lives on the server,...
5
by: samuelberthelot | last post by:
Hi, I get this exception when I use a themed css file. In my web.config file I have: <pages theme="dRise"> and the trouble page is a master page : <% Response.Write(Header)%> <form...
4
by: Mark | last post by:
Can anyone tell me how i can prevent that users can see my connection string to mysql database? Using my browser i could easely use the function: view source.....showing the html/php code. ...
4
by: ingibjark | last post by:
Hello all I’m securing a web service using WSE 2.0. One of the potential client’s of the web service is a Java client using Sun JWSDP 1.5. The problem is that the java client gets the...
6
by: Joseph Geretz | last post by:
I have the following class which I am serializing and passing back and forth between my Web Service application and the client. public class Token : SoapHeader { public string SID; public...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.