RE: [PHP] File reading code2

2007-01-06 Thread Peter Lauri
.com - company web site www.lauri.se - personal web site www.carbonfree.org.uk - become Carbon Free -Original Message- From: Delta Storm [mailto:[EMAIL PROTECTED] Sent: Saturday, January 06, 2007 10:39 AM To: php-general@lists.php.net Subject: [PHP] File reading code2 Hi, Can someone make m

[PHP] File reading code2

2007-01-06 Thread Delta Storm
Hi, Can someone make me an example of simple reading a *.txt file on a hard drive and displaying that file with a echo command or some loop or anything path to file: (C:\Program Files\XAMPP\xampp\htdocs\test_folder\test1.txt) btw the script is in this folder to. Full code please. Thanks i

Re: [PHP] file reading and regex

2003-06-04 Thread Michael Allan
Marek, Your pattern should look like: $pattern = "([[:digit:]]{6}0425\.jpg)"; BINGO! This will give you the image name, but remember that ereg works on single lines and also the image might be taken at some time around 4:25. So you need a while loop to read the html line by line, in the loop t

Re: [PHP] file reading and regex

2003-06-04 Thread Marek Kilimajer
Your pattern should look like: $pattern = "([[:digit:]]{6}0425\.jpg)"; This will give you the image name, but remember that ereg works on single lines and also the image might be taken at some time around 4:25. So you need a while loop to read the html line by line, in the loop try to match the

RE: [PHP] file reading and regex

2003-06-04 Thread Jay Blanchard
[snip] http://rsd.gsfc.nasa.gov/goesg/earth/Weather/GMS-5/jpg/vis/4km/";; if (!($fp = fopen($URLbase, "r"))) { echo "Could not open the url"; exit; } $contents = fread($fp, 100); fclose($fp); ?> [/snip] Was that r

[PHP] file reading and regex

2003-06-04 Thread Michael Allan
New to the list, so I hope I'm in the right place. I'm trying to write a small php function which checks a page filled with a list of satellite images of earth, and loads the latest one to have been taken at 4:25 in the morning, when the view is most complete (full credit to be given to the ori

[PHP] file reading/writing question.

2002-09-23 Thread Tim Nields
I'm using 4.2.2 on a Linux 7.1 system. The problem that I am encountering is copying the contents out of a pdf file and writing them to a new file. I've tried fopen() in concert with fread() and fwrite() with no success. The file is created, but the file size is markedly smaller. I've also tried

RE: [PHP] file reading

2002-08-27 Thread Brad Dameron
1-888-8TSCNET > -Original Message- > From: phper [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, August 27, 2002 2:03 PM > To: [EMAIL PROTECTED] > Subject: [PHP] file reading > > > how do I read the contents of a file. > > $FileStream = fopen("webmaster/foru

[PHP] file reading

2002-08-27 Thread phper
how do I read the contents of a file. $FileStream = fopen("webmaster/forum".$Forum."/forumtopics.txt", "w+"); $line = fgetss ($FileStream, 255); print ("number is: ".$line." "); fclose($FileStream); always returns nothing -- PHP General Mailing List (http://www.php.net/) To unsubsc

Re: [PHP] File reading help with Syntax

2002-07-17 Thread Analysis & Solutions
On Wed, Jul 17, 2002 at 10:00:29AM -0400, Chris Crane wrote: > I am getting data froma website for stock information. If I type in the > brower the URL I get a text file display list this; > > Date,Open,High,Low,Close,Volume > 16-Jul-02,7.92,8.10,7.68,7.82,605500 > 15-Jul-02,7.98,8.02,7.59,8.02,5

[PHP] File reading help with Syntax

2002-07-17 Thread Chris Crane
I am getting data froma website for stock information. If I type in the brower the URL I get a text file display list this; Date,Open,High,Low,Close,Volume 16-Jul-02,7.92,8.10,7.68,7.82,605500 15-Jul-02,7.98,8.02,7.59,8.02,577200 12-Jul-02,7.80,8.00,7.57,7.95,411100 11-Jul-02,7.82,7.94,7.34,7.80,

Re: [PHP] file reading and array's

2002-02-16 Thread Scott
Perfect! Thank you, my mind was out in left field somewhere. On Tue, 12 Feb 2002, DL Neil wrote: > Hi Scott, > > > In my constant effort to improve my perl conversion project, I have a > > question regarding file reading. I am taking two files and combining > > them in an array and then writ

Re: [PHP] file reading and array's

2002-02-12 Thread DL Neil
Hi Scott, > In my constant effort to improve my perl conversion project, I have a > question regarding file reading. I am taking two files and combining > them in an array and then writing out a new file. Is there a way to: > a)strip out the first line of the second file > b)test for conditions

[PHP] file reading and array's

2002-02-11 Thread Scott
Hi gang: In my constant effort to improve my perl conversion project, I have a question regarding file reading. I am taking two files and combining them in an array and then writing out a new file. Is there a way to: a)strip out the first line of the second file b)test for conditions based on w

Re: [PHP] file reading and textarea problem

2001-10-03 Thread Mukul Sabharwal
Hi, fopen let's you read the whole file. Try this tutorials on files for a more hands on approach : http://www.paphe.com/php/tutorials/111000.php = * Know more about me: http://www.geocities.com/mimodit * _

RE: [PHP] file reading and textarea problem

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)
Yup. fread() Read on PHP.net/fread PHP.net/fgets ...to learn how to manipulate files. Maxim Maletsky www.PHPBeginner.com -Original Message- From: Nikola Veber [mailto:[EMAIL PROTECTED]] Sent: mercoledi 3 ottobre 2001 11.11 To: php forum Subject: [PHP] file reading and textarea

Re: [PHP] file reading and textarea problem

2001-10-03 Thread Philip Olson
If you use fgets(), you can loop through it like the example does : http://www.php.net/fgets Or, consider the file() function which automagically assigns each line to an element of the array. http://www.php.net/file Or, you could open the file as a one string using fread(), see the exampl

[PHP] file reading and textarea problem

2001-10-03 Thread Nikola Veber
Hi ! I'm having a problem with the following : I have a log file on my site, that records date, time and the user's system. Each entry is placed in a new line. Now, I can only read the first line with fgets($filename, 4096). Is there another function, or the 4096 number should be changed in