473,320 Members | 1,896 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

a simple wget in C language?

Hello everybody,

I have a little problem with a littre program i'm writting :
I use the system(char* s) function in my program to retreve an information.
The problem is that when wget in launched and as retrieved the file, my
program stops instatanly....

So I see two possible solutions :
1\ making system() not exiting after executin wget
2\ building a little wget as a function of my program

but I don't know how to do such things ... that's why I'm here ;)

Someone could help me? (sorry for the bad englesh ;) )
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.775 / Virus Database: 522 - Release Date: 08/10/2004
Nov 14 '05 #1
9 7722
"olivier HARO" <o.****@en-compro.com> wrote in message
news:41**********************@news.astraweb.com...
Hello everybody,

I have a little problem with a littre program i'm writting :
I use the system(char* s) function in my program to retreve an information. The problem is that when wget in launched and as retrieved the file, my
program stops instatanly....

So I see two possible solutions :
1\ making system() not exiting after executin wget
2\ building a little wget as a function of my program

but I don't know how to do such things ... that's why I'm here ;)

Someone could help me? (sorry for the bad englesh ;) )

Do you mind posting a small working case of your code.
--
Imanpreet Singh Arora
Zmoc.Zliamg@Zteerpnami
Remove Z to mail
"Things may come to those who wait, but only the things left by those who
hustle."
Abraham Lincoln
Nov 14 '05 #2
Minti wrote:
"olivier HARO" <o.****@en-compro.com> wrote in message

I have a little problem with a littre program i'm writting :

I use the system(char* s) function in my program to retreve an
information. The problem is that when wget in launched and as
retrieved the file, my program stops instatanly....
.... snip ...
Do you mind posting a small working case of your code.


No, please don't. wget is off-topic here, as is anything run by
system() (but not the call to system itself). I think you want
comp.unix.programmer (or similar).

Minti has been around here before, and should know better than to
encourage off-topic postings.

--
Chuck F (cb********@yahoo.com) (cb********@worldnet.att.net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!
Nov 14 '05 #3


"CBFalconer" <cb********@yahoo.com> wrote in message
news:41***************@yahoo.com...
Minti wrote:
"olivier HARO" <o.****@en-compro.com> wrote in message

I have a little problem with a littre program i'm writting :

I use the system(char* s) function in my program to retreve an
information. The problem is that when wget in launched and as
retrieved the file, my program stops instatanly....

... snip ...

Do you mind posting a small working case of your code.


No, please don't. wget is off-topic here, as is anything run by
system() (but not the call to system itself). I think you want
comp.unix.programmer (or similar).

Minti has been around here before, and should know better than to
encourage off-topic postings.


Thanks, but I just did not want to get to the conclusion straight away that
the problem was caused by @system@.
--
Imanpreet Singh Arora
Zmoc.Zliamg@Zteerpnami
Remove Z to mail
"Things may come to those who wait, but only the things left by those who
hustle."
Abraham Lincoln
Nov 14 '05 #4
there is a thing that is nor off-subject :
is there anywere a free C function that I could use to download a web page
from a URL?
"Minti" <mi************@yahoo.com> a écrit dans le message de
news:2t*************@uni-berlin.de...


"CBFalconer" <cb********@yahoo.com> wrote in message
news:41***************@yahoo.com...
Minti wrote:
"olivier HARO" <o.****@en-compro.com> wrote in message
>
> I have a little problem with a littre program i'm writting :
>
> I use the system(char* s) function in my program to retreve an
> information. The problem is that when wget in launched and as
> retrieved the file, my program stops instatanly.... ... snip ...

Do you mind posting a small working case of your code.


No, please don't. wget is off-topic here, as is anything run by
system() (but not the call to system itself). I think you want
comp.unix.programmer (or similar).

Minti has been around here before, and should know better than to
encourage off-topic postings.


Thanks, but I just did not want to get to the conclusion straight away

that the problem was caused by @system@.
--
Imanpreet Singh Arora
Zmoc.Zliamg@Zteerpnami
Remove Z to mail
"Things may come to those who wait, but only the things left by those who
hustle."
Abraham Lincoln

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.775 / Virus Database: 522 - Release Date: 08/10/2004
Nov 14 '05 #5
olivier HARO <o.****@en-compro.com> scribbled the following:
there is a thing that is nor off-subject :
is there anywere a free C function that I could use to download a web page
from a URL?


Not in standard C.

--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ------------- Finland --------\
\-------------------------------------------------------- rules! --------/
"'So called' means: 'There is a long explanation for this, but I have no
time to explain it here.'"
- JIPsoft
Nov 14 '05 #6
I have found a issue ....
ok, this is a little dirty but it works ;)

when i use a sleep() after the system() ... the program goes on... ;)
in fact, the program don't wait the end of the system() function execution
to continue executing the next lines.
That's why it was bugging....

"Joona I Palaste" <pa*****@cc.helsinki.fi> a écrit dans le message de
news:ck**********@oravannahka.helsinki.fi...
olivier HARO <o.****@en-compro.com> scribbled the following:
there is a thing that is nor off-subject :
is there anywere a free C function that I could use to download a web page from a URL?


Not in standard C.

--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ------------- Finland --------\
\-------------------------------------------------------- rules! --------/
"'So called' means: 'There is a long explanation for this, but I have no
time to explain it here.'"
- JIPsoft

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.775 / Virus Database: 522 - Release Date: 08/10/2004
Nov 14 '05 #7

I think now I know what Chuck meant. BTW please don't toppost its for
assholes.
--
Imanpreet Singh Arora
Zmoc.Zliamg@Zteerpnami
Remove Z to mail

"olivier HARO" <o.****@en-compro.com> wrote in message
news:41**********************@news.astraweb.com...
there is a thing that is nor off-subject :
is there anywere a free C function that I could use to download a web page
from a URL?
"Minti" <mi************@yahoo.com> a écrit dans le message de
news:2t*************@uni-berlin.de...


"CBFalconer" <cb********@yahoo.com> wrote in message
news:41***************@yahoo.com...
Minti wrote:
> "olivier HARO" <o.****@en-compro.com> wrote in message
>>
>> I have a little problem with a littre program i'm writting :
>>
>> I use the system(char* s) function in my program to retreve an
>> information. The problem is that when wget in launched and as
>> retrieved the file, my program stops instatanly....
... snip ...
>
> Do you mind posting a small working case of your code.

No, please don't. wget is off-topic here, as is anything run by
system() (but not the call to system itself). I think you want
comp.unix.programmer (or similar).

Minti has been around here before, and should know better than to
encourage off-topic postings.


Thanks, but I just did not want to get to the conclusion straight away

that
the problem was caused by @system@.
--
Imanpreet Singh Arora
Zmoc.Zliamg@Zteerpnami
Remove Z to mail
"Things may come to those who wait, but only the things left by those who hustle."
Abraham Lincoln

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.775 / Virus Database: 522 - Release Date: 08/10/2004

Nov 14 '05 #8
Minti <mi************@yahoo.com> scribbled the following:
I think now I know what Chuck meant. BTW please don't toppost its for
assholes.


Heh heh.

--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ------------- Finland --------\
\-------------------------------------------------------- rules! --------/
"To know me IS to love me."
- JIPsoft
Nov 14 '05 #9
In article <ck**********@oravannahka.helsinki.fi>, Joona I Palaste wrote:
olivier HARO <o.****@en-compro.com> scribbled the following:
there is a thing that is nor off-subject :
is there anywere a free C function that I could use to download a web page
from a URL?


Not in standard C.


indeed, not in standaard C. But there are some libraries which come
in pretty handy, like libcurl (http://curl.haxx.se/libcurl/)

Ilja
--
Ilja Booij
IC&S B.V.
Nov 14 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Martin | last post by:
I have a PHP script that should be run a few times a day. Currently I run this script manually as I haven't been able to set up Lynx or wget to run it as a cronjob. Or to be more specific: the...
1
by: LRW | last post by:
In a PHP script I have the following two lines: $thumbproc = escapeshellcmd("wget -q -T 2000 http://(A URL)/pa-thumbs/createthumbs.php?dir=".$order_po." &"); exec("$thumbproc 2>&1", $output); ...
7
by: Ken | last post by:
How do I call c:\wget\wget.exe from a php or html file? so I can use php variables to define the file names to download. I want to set up wget to download several files from a server to my hard...
2
by: Robert P. J. Day | last post by:
just getting started with python, and i'm designing a program for fetching software from the net, given the package name, version number and/or date stamp, download method (tarball, CVS, etc.) and...
2
by: Google Mike | last post by:
I have an RH9 Linux PHP 4.2.2 web page that I need to call a Bash file under the context of root and do the wget command to download a file, clobbering the previous download of this same filename....
7
by: petr pilsl | last post by:
sorry - no idea where to post my question, so I crossposted to a linux and a html-authoring-group. Both groups might be familiar with wget. wget -p http://www.goldfisch.at does not load the...
3
by: Jesse | last post by:
Hi all, I have a problem using wget and Popen. I hope someone can help. -- Problem -- I want to use the command: wget -nv -O "dir/cpan.txt" "http://search.cpan.org" and capture all it's...
9
by: deja | last post by:
Hi all, For a couple of nights I have been trying to figure something out.. I am trying insert a couple of fields into a database. My url looks something like this; ...
2
by: Don69 | last post by:
I have a problem with PHP where wget generates 0 byte files. Below is the code that I use. // ******************** $savedir = "/webroot/vifs/app/webroot/static/1234567890"; $url =...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.