473,385 Members | 1,546 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,385 software developers and data experts.

http - help

I am trying to use get http: to access a web site and parse the html
returned.

I open a socket and send a request across of the form
GET address http/1.0 where address is the specifics i am trying to log
onto.

the code works with web sites such as
"http://www.statistics.gov.uk/instantfigures.asp"
The http protocol header is removed.
The connection onto the socket is made on "www.statistics.gov.uk"
and the get is done on hthe address GET "/instantfigures.asp" http/1.0.

This is successful and the html is successfuly returned.

However, when i try to do exactly the same with the following web site.
"http://epp.eurostat.cec.eu.int/portal/page?_pageid=1996,39140985&_dad=portal&_schema=POR TAL&screen=detailref&language=en&product=EUROIND&r oot=EUROIND/shorties/euro_cp/cp240"
I get returned "ERROR 400 - Bad Request - your browser sent a message
the server could not understand"

I use exactly the same method to perform the call.
remove the http:
connect to the socket on "epp.eurostat.cec.eu.int"
and perform my http on
"/portal/page?_pageid=1996,39140985&_dad=portal&_schema=POR TAL&screen=detailref&language=en&product=EUROIND&r oot=EUROIND/shorties/euro_cp/cp240"

I assume all the ? and , are some sort of parameter list, and i can
find no documentation to help me understand this.
If anyone could help me or know when to find the relevant information
from i would be most grateful
cheers
Anthony

May 16 '06 #1
5 1694
anthony wrote:
[...]
I use exactly the same method to perform the call.
remove the http:
connect to the socket on "epp.eurostat.cec.eu.int"
and perform my http on
"/portal/page?_pageid=1996,39140985&_dad=portal&_schema=POR TAL&screen=detailref&language=en&product=EUROIND&r oot=EUROIND/shorties/euro_cp/cp240"

I assume all the ? and , are some sort of parameter list, and i can
find no documentation to help me understand this.


Please post to 'comp.infosystems.www.authoring.cgi'. Your question has
nothing to do with C++ language and as such is off-topic here.

V
--
Please remove capital As from my address when replying by mail
May 16 '06 #2
Victor Bazarov wrote:
anthony wrote:
[...]
I use exactly the same method to perform the call.
remove the http:
connect to the socket on "epp.eurostat.cec.eu.int"
and perform my http on
"/portal/page?_pageid=1996,39140985&_dad=portal&_schema=POR TAL&screen=detailref&language=en&product=EUROIND&r oot=EUROIND/shorties/euro_cp/cp240"

I assume all the ? and , are some sort of parameter list, and i can
find no documentation to help me understand this.


Please post to 'comp.infosystems.www.authoring.cgi'.


I don't know that newsgroup, but it sounds like the wrong one, too. This has
nothing to do with CGI. It's about the http protocol. One probably good
source of information about that protocol might be the RFC that defines it.
To the OP: See http://www.faqs.org/rfcs/rfc2616.html

May 16 '06 #3
>I am trying to use get http: to access a web site and parse the html
returned.


There are a specific WinAPI set of functions that will make your job
easier: WINHTTP

Client: Requires Windows XP SP1 or Windows 2000 Professional SP3.
Server: Requires Windows Server 2003 or Windows 2000 Server SP3 and
later.
Header: Declared in Winhttp.h.
Library: Use Winhttp.lib.
DLL: winhttp.dll

Search the MSDN collection or google :)

May 16 '06 #4
anthony wrote:
I am trying to use get http: to access a web site and parse the html
returned.

I open a socket and send a request across of the form
GET address http/1.0 where address is the specifics i am trying to log
onto.

the code works with web sites such as
"http://www.statistics.gov.uk/instantfigures.asp"
The http protocol header is removed.
The connection onto the socket is made on "www.statistics.gov.uk"
and the get is done on hthe address GET "/instantfigures.asp" http/1.0.

This is successful and the html is successfuly returned.

However, when i try to do exactly the same with the following web site.
"http://epp.eurostat.cec.eu.int/portal/page?_pageid=1996,39140985&_dad=portal&_schema=POR TAL&screen=detailref&language=en&product=EUROIND&r oot=EUROIND/shorties/euro_cp/cp240"
I get returned "ERROR 400 - Bad Request - your browser sent a message
the server could not understand"

Did you do what I suggested last time you asked?

--
Ian Collins.
May 16 '06 #5
asterisc wrote:
I am trying to use get http: to access a web site and parse the html
returned.

Please be more careful with quoting. I wasn't the one who wrote that.
There are a specific WinAPI set of functions that will make your job
easier: WINHTTP


They will only if the OP is using Windows. Otherwise, they will be
completely useless to him.

May 17 '06 #6

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

Similar topics

8
by: turnit \(removethis\) | last post by:
I have a login form that uses the post method to carry the information to the next page. The form works just fine in ie6.0, but fails in mozilla and fails in ie5.2 on a mac. "HTTP/1.1 400 Bad...
5
by: designsimply | last post by:
I am trying to http post some xml to to a remote server using php. When I try to submit xml using PEAR's HTTP_Client::post() to the remote server, I get back the following "Invalid Document Format"...
8
by: Rene | last post by:
Hi, I'm spend many hour to fix this problem, read many articles about it but no article gave a solution. To isolate the problem I've created in IIS6 (WServer2003) a virtual directory test to...
6
by: A.M-SG | last post by:
Hi, I have an aspx page at the web server that provides PDF documents for smart client applications. Here is the code in aspx page that defines content type: Response.ContentType =...
11
by: Tomas Kepic | last post by:
Hi, i'm trying to create my first ASP.NET project ( HelloASPWorld project) but an error occured when I put OK button in NewProject. ERROR: "The Web server reported the following error when...
4
by: alf | last post by:
Hi I would like to convert the wctpXml-1.3.py program to Tcl (line by line). See http://sourceforge.net/project/showfiles.php?group_id=29217 This program sends pages using WCTP. I know nothing...
15
by: Cheryl Langdon | last post by:
Hello everyone, This is my first attempt at getting help in this manner. Please forgive me if this is an inappropriate request. I suddenly find myself in urgent need of instruction on how to...
4
by: bkasmai | last post by:
My asp.net application (developed using vs2003) runs fine on a windows 2000 server using iis 5.0. Our network manager wants to do away with any http connections and only use https for services that...
16
by: Harry Simpson | last post by:
I've been away from ASPNET - I open up a new Web app in VS2008 and go into properties and select to use IIS instead of the personal web server. Then I run in debug mode and it says I have to set...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.