This mightn't work (depending on what IDE you're using), but here's something I posted a while ago - http://cboard.cprogramming.com/showp...57&postcount=9
It's not a great solution really. As zac said - use libcurl - http://curl.haxx.se It's not hard to use.
My output:
Code:
Enter the URL: http://www.google.com
<html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>Google</title><style>body,td,a,p,.
h{font-family:arial,sans-serif}.h{font-size:20px}.h{color:#3366cc}.q{color:#00c}.ts td{padding:0}.ts{border-collapse:col
lapse}</style><script>
<!--
window.google={kEI:"F5f-RqS6E464xAGH4aAc",kEXPI:"17259,17735",kHL:"nn"};function sf(){document.f.q.focus();}
window.clk=function(b,c,d,e,f,g){if(document.images){var a=encodeURIComponent||escape;(new Image).src="/url?sa=T"+(c?"&o
i="+a(c):"")+(d?"&cad="+a(d):"")+"&ct="+a(e)+"&cd="+a(f)+(b?"&url="+a(b.replace(/#.*/,"")).replace(/\+/g,"%2B"):"")+"&ei
=F5f-RqS6E464xAGH4aAc"+g}return true};// -->
</script>
</head><body bgcolor=#ffffff text=#000000 link=#0000cc vlink=#551a8b alink=#ff0000 onload="sf();if(document.images){new
Image().src='/images/nav_logo3.png'}" topmargin=3 marginheight=3><div align=right id=guser style="font-size:84%;padding:
0 0 4px" width=100%><nobr><a href="https://www.google.com/accounts/Login?continue=http://www.google.com/&hl=nn">Logg på
</a></nobr></div><center><br clear=all id=lgpd><img alt="Google" height=110 src="/intl/nn_ALL/images/logo.gif" width=334
><br><br><form action="/search" name=f><style>#lgpd{display:none}</style><script defer><!--
function qs(el){if(window.RegExp&&window.encodeURIComponent){var ue=el.href,qe=encodeURIComponent(document.f.q.value);if
(ue.indexOf("q=")!=-1){el.href=ue.replace(new RegExp("q=[^&$]*"),"q="+qe);}else{el.href=ue+"&q="+qe;}}return 1;}
//-->
</script><table border=0 cellspacing=0 cellpadding=4><tr><td nowrap><font size=-1><b>Veven</b> <a
class=q href="http://images.google.com/imghp?oe=UTF-8&hl=nn&tab=wi" onclick="return qs(this)">Bilete</a> &nb
sp; <a class=q href="http://groups.google.com/grphp?oe=UTF-8&hl=nn&tab=wg" onclick="return qs(this)">Grupper</a>&nb
sp; <a class=q href="/dirhp?oe=UTF-8&hl=nn&tab=wd" onclick="return qs(this)">Katalog</a> &nb
sp; <!--"/*"/*--><font size=-1><a class=q onClick='return window.qs?qs(this):1' href='http://127.0.0.1:4664/&s=OyHX
5sj3H8T6QlFLBCw2ZKLLBP0'>Desktop</a></font> </font></td></tr></table><table cellpadding=0 cellspa
cing=0><tr valign=top><td width=25%> </td><td align=center nowrap><input name=hl type=hidden value=nn><input maxlen
gth=2048 name=q size=55 title="Google-s├╕k" value=""><br><input name=btnG type=submit value="Google-s├╕k"><input name=bt
nI type=submit value="Beint fram!"></td><td nowrap width=25%><font size=-2> <a href=/advanced_search?hl=nn>Ut
vida s├╕k</a><br> <a href=/preferences?hl=nn>Innstillingar</a><br> <a href=/language_tools?hl=nn>S
pråkverkty</a></font></td></tr></table></form><br><br><font size=-1><a href="/intl/no/about.html">Alt om Google</a> -
<b><a href=http://www.google.ie/>Gå til Google Ireland</a></b><span id=hp style="behavior:url(#default#homepage)"></spa
n><script><!--
(function() {var a="http://www.google.com/",b=document.getElementById("hp"),c=b.isHomePage(a);_rptHp=function(){(new Ima
ge).src="/gen_204?sa=X&ct=mgyhp&cd="+(b.isHomepage(a)?1:0)};if(!c){document.write('<p><a href=/mgyhp.html onClick=docume
nt.getElementById("hp").setHomepage("'+a+'");_rptHp();>Gjer Google til startsida di!</a>')};})();//-->
</script></font><p><font size=-2>©2007 Google</font></p></center></body></html>