Q:

How to remove this HEADER HTTP?

I made a socket in C. This program is operated by command line and compiled on Linux. It does the following:

Takes a a full URI and a file name
Connects to a server, retrieves the page and saved in the specified file.
After obtaining the remote data. The file received by the recv function comes with a HEADER.

My question is: 
How to remove this HEADER before the file is recorded by the fwrite () function.
like a byte to byte code, to find a double line "\ n \ n".

A:

An HTTP header always ends in \r\n\r\n. Therefore you just want to find the first string match of that, and increment the position by 4 bytes.
strstr() function
The strstr() function (found in string.h) does just this:
char * strstr(const char *str1, const char *str2);

Where str2 is the string you're searching for in str1.
It returns the memory location to the beginning of the first match. If the string is not found it returns NULL.
Example
So, if you assume the buffer is larger than the header:
char *buf = getHTTPResponse(url); // Get HTTP response from URL
char *content = strstr(buf, "\r\n\r\n");
if (content != NULL) {
    content += 4; // Offset by 4 bytes to start of content
}
else {
    content = buf; // Didn't find end of header, write out everything
}

// Write out content to file

See here for a complete HTTP client example in C that uses strstr().

