Website data

  • Thread starter Thread starter Vivien Parlat
  • Start date Start date
V

Vivien Parlat

Hello,

Sorry for my previous message in french... Here it is in (bad)
english:

For my own use I'm trying to make an app which takes two cities
(origin, destination) and two times (departure, arrival), fills in
form at http://www.voyages-sncf.com/dynamic/comm.travel?ORIGIN_CITY=Paris&DESTINATION_CITY=Toulouse,
and retrieves data, to display to me all possibilities in a day, and
best prices for travels (making this by hand is boring).

My problem is, I can't even get the first result page. Going to above
URL loads in a browser, a page which has a different URL. Looks like
there are many redirections. However when I load this page, (I use
wrapper at http://www.west-wind.com/presentations/dotnetWebRequest/dotnetWebRequest.htm),
I can get the form source, totally empty. I try to post data (minimal,
then more complete), but the response page seems to be a redirection,
to an error page, or to the same form...

Maybe I don't post enough data (as defaulted pieces of data ?) but no
message tells me that, and I don't know how to spy, in a browser nor a
WebBrowser object, which data are POSTed and GET... (this could be
useful)

I yet saw a post on a near subject (http://
groups.google.com/group/microsoft.public.fr.dotnet.csharp/
browse_thread/thread/f8fb4e8ea3757e66/d8cbc3ab6ecbcccf?lnk=st&q=r
%C3%A9cup%C3%A9rer+infos+sur+un+site+c%23#d8cbc3ab6ecbcccf) but my
problems looks more complicated.

Any help would be appreciated...

Thanks in advance.
 
Vivien,

More than likely, the server is checking for things like cookies, the
user agent string, and doing a whole lot of redirections. You can mimic
this with the HttpWebRequest/HttpWebResponse classes, but you have to do it
like a browser does.

You should look for a tool called "Fiddler". It is an HTTP
request/response interceptor, and it is free. It will help you determine
the exchange pattern for the site.
 
Vivien,

More than likely, the server is checking for things like cookies, the
user agent string, and doing a whole lot of redirections. You can mimic
this with the HttpWebRequest/HttpWebResponse classes, but you have to do it
like a browser does.

You should look for a tool called "Fiddler". It is an HTTP
request/response interceptor, and it is free. It will help you determine
the exchange pattern for the site.

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)


Sorry for my previous message in french... Here it is in (bad)
english:
For my own use I'm trying to make an app which takes two cities
(origin, destination) and two times (departure, arrival), fills in
form at
http://www.voyages-sncf.com/dynamic/comm.travel?ORIGIN_CITY=Paris&DES...,
and retrieves data, to display to me all possibilities in a day, and
best prices for travels (making this by hand is boring).
My problem is, I can't even get the first result page. Going to above
URL loads in a browser, a page which has a different URL. Looks like
there are many redirections. However when I load this page, (I use
wrapper at
http://www.west-wind.com/presentations/dotnetWebRequest/dotnetWebRequ...),
I can get the form source, totally empty. I try to post data (minimal,
then more complete), but the response page seems to be a redirection,
to an error page, or to the same form...
Maybe I don't post enough data (as defaulted pieces of data ?) but no
message tells me that, and I don't know how to spy, in a browser nor a
WebBrowser object, which data are POSTed and GET... (this could be
useful)
I yet saw a post on a near subject (http://
groups.google.com/group/microsoft.public.fr.dotnet.csharp/
browse_thread/thread/f8fb4e8ea3757e66/d8cbc3ab6ecbcccf?lnk=st&q=r
%C3%A9cup%C3%A9rer+infos+sur+un+site+c%23#d8cbc3ab6ecbcccf) but my
problems looks more complicated.
Any help would be appreciated...
Thanks in advance.

Thank you. I was looking for a tool such as Fiddler, without finding
it.
I can now retrieve the webpage to analyze using a hidden WebBrowser
navigating to the good forged url, redirections seem unavoidable, and
I cannot re-create a webbrowser... This makes my program very slow,
but in one direction it works :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top