Greetings all. I'm fairly new to php and I'm trying to copy a web page to a file so I can run some regular expressions on it but I'm getting errors (uspecific).
I'm running on Windows2000, php 4.2.2 and Apache 1.3.24
Here is a sample script that causes problems:
1 - <?php
2 -
3 - $ch = curl_init ("http://www.php.net/");
4 - $fp = fopen ("php_homepage.txt", "w");
5-
6 - curl_setopt ($ch, CURLOPT_FILE, $fp);
7 - curl_setopt ($ch, CURLOPT_HEADER, 0);
8 -
9 - curl_exec ($ch);
10 - curl_close ($ch);
11 - fclose ($fp);
12 - ?>
If I comment out line 6 then it works as I would expect it to. It displays in the browser window.
If line 6 is not commented out then I get a popup window with the following error:
Program Error
Apache.exe has generated errors and will be closed by Windows.
You will need to restart the program.
An error log is being created.
**It doesn't log anything to Apache/logs/Error
Can anyone give me any idea as to what's going on?
Thanks