Sponsored Content
Top Forums Programming C++: get html page and store it in string Post 302745903 by DGPickett on Tuesday 18th of December 2012 10:38:56 AM
Old 12-18-2012
Or you can get lazy, shell out or popen() to wget to a pipe or file and read() the pipe or file or mmap() the file. It depends on the intensity of the application, ok unless you need more efficiency. The file is nice as you can get the size after.
 

10 More Discussions You Might Find Interesting

1. Solaris

Accessing a HTML page

Hi All, In our unix server we have an apache web server running. I can access the default apache web page from my windows machine. Now, I want to create my own webpage. Therefore I created webpage at /export/home/myname/test.html file. Where do I need to place this file and what do I need... (0 Replies)
Discussion started by: pkm_oec
0 Replies

2. UNIX for Dummies Questions & Answers

Accessing a HTML page

Hi All, In our unix server we have an apache web server running. I can access the default apache web page from my windows machine. Now, I want to create my own webpage. Therefore I created webpage at /export/home/myname/test.html file. Where do I need to place this file and what do I need... (2 Replies)
Discussion started by: pkm_oec
2 Replies

3. Web Development

findstr in html page

I am planning to create an html page that will count number of connected ports, challenge for me is how to put it in a page. Thanks! (1 Reply)
Discussion started by: webmunkey23
1 Replies

4. Web Development

Login page in html on unix

I want to create a login page in HTML which is hosted on apache server. The login page first authenticate the user and then directed to a form which in turn run a script on the server. I want to make login page without php or jsp. Please advice. (13 Replies)
Discussion started by: ravi18s
13 Replies

5. UNIX for Dummies Questions & Answers

Publishing HTML Page

Hi All, Thanks for reading. I am not sure if I am asking this in the correct group. But here it goes: There is a shell script which does some system checks and creates an html file called system_summary.html on my Red Hat machine say in /reports directory every hour. Now I want to view it... (1 Reply)
Discussion started by: deepakgang
1 Replies

6. Red Hat

Publishing HTML Page

Hi All, Thanks for reading. I am not sure if I am asking this in the correct group. But here it goes: There is a shell script which does some system checks and creates an html file called system_summary.html on my Red Hat machine say in /reports directory every hour. Now I want to view it... (6 Replies)
Discussion started by: deepakgang
6 Replies

7. Shell Programming and Scripting

How to extract url from html page?

for example, I have an html file, contain <a href="http://awebsite" id="awebsite" class="first">website</a>and sometime a line contains more then one link, for example <a href="http://awebsite" id="awebsite" class="first">website</a><a href="http://bwebsite" id="bwebsite"... (36 Replies)
Discussion started by: 14th
36 Replies

8. Shell Programming and Scripting

Attached HTML page to Email

Greeting all, Not sure anyone tested to send out email with HTML page as attachment from Shell Script ? I know if I use uuencode file.html approach, the mail receive in attachment is empty. So I guess uuencode cannot be use for the html code. Appreciate if anyone can share the code to... (0 Replies)
Discussion started by: ckwan
0 Replies

9. Shell Programming and Scripting

Monitoring an html web page changes

Hello, I need to monitor an html web page for ANY changes and should be able to know if it's modified or not (since last query). I do not need what modifications but just notification is enough. This is a simple web page and I don't need to parse the links any further. Is it possible to do... (10 Replies)
Discussion started by: prvnrk
10 Replies

10. Shell Programming and Scripting

Accessing the html page

Hi All, In our unix server we have an apache web server running. Now, I want to create my own webpage. Therefore I created webpage at /export/home/test.html file. Where do I need to place this file and what do I need mention this page in my web browser to access it. Without apache... (1 Reply)
Discussion started by: Arasu
1 Replies
popen(3)						     Library Functions Manual							  popen(3)

NAME
popen - Initiates a pipe to a process LIBRARY
Standard C Library (libc.so, libc.a) SYNOPSIS
#include <stdio.h> FILE *popen ( const char *command, const char *type ); STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: popen(): XPG4, XPG4-UNIX Refer to the standards(5) reference page for more information about industry standards and associated tags. PARAMETERS
Points to a null-terminated string containing a shell command line. Points to a null-terminated string containing an I/O mode. DESCRIPTION
The popen() function creates a pipe between the calling program and a shell command to be executed. It returns a pointer to a FILE struc- ture for the stream. If the type parameter is the value r, the calling program can read from the standard output of the command by reading from the returned file stream. If the type parameter is the value w, the calling program can write to the standard input of the command by writing to the returned file stream. Because open files are shared, a type r command can be used as an input filter and a type w command as an output filter. NOTES
Programs using the popen() function to invoke an output filter should beware of possible deadlock caused by output data remaining in the program's buffer. This can be avoided by either using the setbuf() function to ensure that the output stream is unbuffered, or by using the fflush() function to ensure that all buffered data is flushed before calling the pclose() function. If the original processes and the process started with the popen() function concurrently read or write a common file, neither should use buffered I/O. If they do, the results are unpredictable. RETURN VALUES
Upon successful completion, the popen() function returns a pointer to the FILE structure for the opened stream. In case of error because files or processes could not be created, the popen() function returns a null pointer. RELATED INFORMATION
Functions: exec(2), fork(2), fclose(3), fopen(3), pclose(3), pipe(2), setbuf(3) Standards: standards(5) delim off popen(3)
All times are GMT -4. The time now is 07:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy