473,505 Members | 15,212 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to download an URL (cross-platform)

Is there a simple, cross-platform method of downloading an URL. I can
in Python by typing:

data = urllib2.urlopen('www.example.com/example file.html').read()

and I was wondering if there was an easy way to do that in C or C++
(without using some Microsoft/Visual Studio or Mac-only method). If you
know of a way, please reply; thanks in advance.

Simon

Aug 24 '06 #1
1 2776
"Simon" <Si***********@gmail.comwrote in message
news:11**********************@p79g2000cwp.googlegr oups.com...
: Is there a simple, cross-platform method of downloading an URL. I can
: in Python by typing:
:
: data = urllib2.urlopen('www.example.com/example file.html').read()
:
: and I was wondering if there was an easy way to do that in C or C++
: (without using some Microsoft/Visual Studio or Mac-only method). If you
: know of a way, please reply; thanks in advance.

Of course the standard C++ library provides nothing for that, but
cross-platform libraries exist.
A popular choice seems to be libcurl: http://curl.haxx.se/libcurl/

hth
--
http://ivan.vecerina.com/contact/?subject=NG_POST <- email contact form
Aug 24 '06 #2

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

Similar topics

20
3661
by: Thomas Heller | last post by:
I'm currently working on a new version of py2exe, which will require Python 2.3 and later, because it uses the zipimport mechanism. Since py2exe is a distutils extension, and since C compilers...
6
8507
by: chon | last post by:
I have an ASP page that is sent a file location as a parameter. It opens this file, loads the ADODB.Stream object and does a binary write to the page forcing the download dialog to appear. This...
5
1353
by: Alx | last post by:
Hello everybody... I got a question about porting my application to other operating systems. I'm very comfortable writing applications with VS.NET 2003 (VS .NET 2005 looks even much better), but...
1
1501
by: Alois Weber | last post by:
I'm not shure wether its the right place to ask here. But I don't know where to ask else. Does anybody know a free crossplatform library (for linux/windows perhaps Mac) which offers some classes...
16
3222
by: matt | last post by:
I have used some free code for listing files for download, but I want to send an email to the administrator when the file has been downloaded. I have got some code in here that does it, but it will...
0
1529
by: Hotlips | last post by:
Hi I'm currently looking for a RMI system that works crossplatform (at least Windows/Linux). The system must support: - Basic C++ types like char, float double as both and (by value, and by...
1
2150
by: JayLembeck | last post by:
Over 50,000 Free Ringtone. Get the Latest Ringtone. Download now- Fast, Free and Easy. Get your FREE surprise RINGTONE now! http://seekoutfast.info/free-ringtone/ free ringtone free ringtone new...
1
47347
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Many websites have a form or a link you can use to download a file. You click a form button or click...
0
7098
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
7303
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
7367
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...
1
7018
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...
0
7471
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...
0
5613
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3187
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...
0
3176
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
754
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.