sure 
following is the code to create a socket under linux, use it to send an HTTP request and then receive the response in a buffer, and if it's a file then i guess it'll just be downloaded:
Code:
#include <string>
#include <errno.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include <stdio.h>
#define HTTP_PORT 80
const std::string IP_ADDRESS = "xxx.xxx.xxx.xxx";
#define BUFF_SIZE 8192
int main(int argc, char** argv)
{
struct sockaddr_in server;
struct hostent* host_info;
unsigned long addr;
int sock;
char buffer[BUFF_SIZE];
int count;
/* create socket */
sock = socket( PF_INET, SOCK_STREAM, 0);
if (sock < 0)
{
perror( "failed to create socket");
exit(1);
}
memset( &server, 0, sizeof (server));
/* convert servername to IP address */
host_info = gethostbyname(IP_ADDRESS.c_str());
if (NULL == host_info)
{
printf("unknown server");
exit(1);
}
memcpy( (char *)&server.sin_addr, host_info->h_addr, host_info->h_length);
server.sin_family = AF_INET;
server.sin_port = htons( HTTP_PORT);
/* connect to the server */
if ( connect( sock, (struct sockaddr*)&server, sizeof( server)) < 0)
{
perror( "can't connect to server");
exit(1);
}
/* create and send the http GET request */
std::string tRequest = "GET /file.txt /*here we're targeting http://xxx.xxx.xxx.xxx/file.txt and we wanna download that file as an example*/HTTP/1.1 \nHost:" + IP_ADDRESS + "\n\n";
send( sock, tRequest.c_str(), tRequest.length(), 0);
do
{
count = recv( sock, buffer, sizeof(buffer), 0);
// and we have our response stored in the buffer, safe and sound
}
while (count > 0);
return 0;
}