473,651 Members | 2,716 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.ce c.eu.int/portal/page?_pageid=19 96,39140985&_da d=portal&_schem a=PORTAL&screen =detailref&lang uage=en&product =EUROIND&root=E UROIND/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.c ec.eu.int"
and perform my http on
"/portal/page?_pageid=19 96,39140985&_da d=portal&_schem a=PORTAL&screen =detailref&lang uage=en&product =EUROIND&root=E UROIND/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 1708
anthony wrote:
[...]
I use exactly the same method to perform the call.
remove the http:
connect to the socket on "epp.eurostat.c ec.eu.int"
and perform my http on
"/portal/page?_pageid=19 96,39140985&_da d=portal&_schem a=PORTAL&screen =detailref&lang uage=en&product =EUROIND&root=E UROIND/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.infosyste ms.www.authorin g.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.c ec.eu.int"
and perform my http on
"/portal/page?_pageid=19 96,39140985&_da d=portal&_schem a=PORTAL&screen =detailref&lang uage=en&product =EUROIND&root=E UROIND/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.infosyste ms.www.authorin g.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.ce c.eu.int/portal/page?_pageid=19 96,39140985&_da d=portal&_schem a=PORTAL&screen =detailref&lang uage=en&product =EUROIND&root=E UROIND/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
10636
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 Request" was the original error msg now that I reinstalled iislockdown and urscan I get "The parameter is incorrect." If I use the get method with this form it works just fine on everything. I can't say for certain but I think this problem started...
5
11804
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" error: Array ( => 200 => Array ( => close
8
7290
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 the local C:\test, in this directory I have index.htm and test.asp (just a simple Response.Write "TEST"). Opening the server/test/index.htm show the page, server/test/test.asp gives
6
13283
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 = "application/octet-stream"; Response.AppendHeader("Content-Disposition", "attachment;filename=" + fileID.ToString() + ".pdf");
11
7726
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 attempting to create or open the Web project located at the following URL: 'https://localhost/HelloASPWorld'.'HTTP/1.0 503 Service Unavailable'."
4
2827
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 about Python or XML but this program is small and seems straightforward and I am sure that I will be able to figure it out - with a little help ;-) Currently I am stuck in not being able to identify the Tcl equivalent of Python's "putrequest",...
15
4596
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 communicate with a MySQL database table on a web server, from inside of my company's Access-VBA application. I know VBA pretty well but have never before needed to do this HTTP/XML/MySQL type functions.
4
2093
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 are used by external users. I have not got a clue how to go about this. My users are authenticated directly by querying a sql table where the user names and passwords are stored. What do I need to do to my application or IIS so that internal...
16
2306
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 the Debug= True in the Web.config which I do. Then try to run it again and it says I must enable integrated security which I do. I then try to run it again and get the HTTP 403 error - " This error (HTTP 403 Forbidden) means that Internet...
0
8275
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8697
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8465
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8579
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5612
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4144
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4283
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2699
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1587
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.