|   | ![[ Previous ]](navbprev.gif)  ![[ Contents ]](navbhome.gif)  ![[ Index ]](navbhelp.gif)  ![[ Next ]](navbnext.gif)  | 
    int Ns_ConnCopyToFile(
    Ns_Conn *conn,
    size_t iToCopy,
    FILE *fp
    );
The Ns_ConnCopyToFile function copies iToCopy bytes of data from the connection to the file pointed to by fp. Ns_ConnCopyToFile returns a status of NS_OK or NS_ERROR.
    	/* Copy the content from the browser to a file. */
    	FILE *fp;
    	int len;
    
    	fp = fopen("content.out", "w");
    	len = Ns_ConnContentLength(conn);
    	Ns_ConnCopyToFile(conn, len, fp);
    	fclose(fp);