ED]
-Original Message-
From: Craig Westerman [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 06, 2002 7:58 PM
To: php-general-list
Subject: [PHP] file_exists
What am I doing wrong? I get parse error between first echo statement and
else.
Thanks
Craig ><>
[EMAIL PROTECTED]
&q
What am I doing wrong? I get parse error between first echo statement and
else.
Thanks
Craig ><>
[EMAIL PROTECTED]
";
else
echo "";
}
?>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
When I run this the first time, file.txt contains value of 30. Then I add 15
to it with following script and file now contains value of 45. I look at
file.txt after write and it does indeed contain number 45. But when I run
script 24 hours later via cron job, it still thinks file.txt is holding
nu
I have an array that contains several empty elements. What is simplest way
to remove these elements?
Array ( [0] => [1] =>
[2] =>
[3] => 16/Mar/02
[4] =>
[5] => 17/Mar/02
[6] => 18/Mar/02
[7] => 19/Mar/02
[8] => 20/Mar/02
[9] => 21/Mar/02
[10] => 22/Mar/02
[11] => 23/Mar/02
[12] =>
[13] => 24/Mar
Wouldn't it be better to check to see if charicater is indeed a comma before
removing it?
I was guessing eregi_replace would be the way to go.
Am I thinking wrong?
Craig ><>
[EMAIL PROTECTED]
First, you'll need to get the length of the str with the str_len() function.
After you have that, use
I have a string that ends in a comma. What is best method to remove the
comma?
Craig ><>
[EMAIL PROTECTED]
I have a simple count file named count_db that contains ONLY the following:
{
'total' => 3954
}
How do I open file, find numbers in the file, add $newnumbers to existing
numbers. Then write these new numbers over the original numbers and close
the file. I'm just needing to do this once a day
I have a simple count file named count_db that contains ONLY the following:
{
'total' => 3954
}
I need to open file, find numbers in the file, add $newnumbers to existing
numbers. Then write these new numbers over the original numbers and close
the file.
Also while I'm doing this a coun
I get the following report from Analog.
Daily Report
(Go To: Top: Monthly Report: Daily Report: Request Report)
This report lists the activity in each day.
Each unit () represents 3,000 requests for pages or part thereof.
date: reqs: pages:
-: ---: ---:
10/Mar/02: 1109810:
I'm trying to set $image = imageA via a URL:
http://www.abc123.com/php001/image_switch.php?image=imageA
Script is:
Image Switch
Image link ends up as:
http://www.abc123.com/php001/.gif
Link needs to be:
http://www.abc123.com/php001/imageA.gif
What am I doing wrong?
Thanks
Crai
I'm needing counter for site that receives 60 to 80 hits a minute. Many I
have tried cause excessive server load and need to be deactivated or they
lose data and return to zero without warning. All tried so far have been
written in Perl.
Anyone here know of a PHP counter that would handle HIGH tr
I did that first thing. Also tried chmod g+rwx
I can copy manually via Telnet, but something is wrong with my PHP script.
Thanks
Craig ><>
[EMAIL PROTECTED]
-Original Message-
From: Julian [mailto:[EMAIL PROTECTED]]
Hi!
You must to set the folder where you want to save the file to
I'm trying to copy daily Analog Stats Report to a archive file. (see code
below) Destination file doesn't exist. I get this error:
Warning: Unable to create '030402.html': Permission denied in
/usr/www/users/cfth/WWW_REPORTS/analogarchive.php on line 9
/WWW_REPORTS/analogarchive.php:Error failed
http://curl.haxx.se/libcurl/php/examples/
-Original Message-
From: Liam [mailto:[EMAIL PROTECTED]]
Sent: Saturday, March 23, 2002 9:57 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Retreiving website contents
Hi, I've asked this before but I'm still ost.
How can I receive the contents of a
Is the second edition much different from the 1st? If one has 1st Edition,
is it worth $39.95 to get the second?
Thanks
Craig ><>
[EMAIL PROTECTED]
Thanks again for your help last night Jim. I found another source that by
passes the middle man and this script (see below) is quicker. It works great
for ONE ticker symbol. Yahoo allows one to retrieve multiple quotes by
typing in comma separated tickers with no spaces.msft,rhat,^dji
The com
lp.
Craig ><>
[EMAIL PROTECTED]
Hi
use ImagePNG($im,"test.png")
Tom
At 12:17 PM 7/03/2002, Craig Westerman wrote:
>The following creates a red rectangle png image
>
>Header("Content-Type: image/png");
>$im = ImageCreate(500, 75);
>$red = ImageColorAl
The following creates a red rectangle png image
This sends created image to browser
ImagePNG($im);
How would I save this image as test.png to file to be hard coded in static
web pages?
Thanks
Craig ><>
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, v
to:[EMAIL PROTECTED]]
Sent: Wednesday, March 06, 2002 4:23 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] data from service into array
Craig Westerman <[EMAIL PROTECTED]> wrote:
> I'm just now trying to learn PHP. I don't know ANYTHING about XML. I don't
> even have any XML ref
egi($lowpattern, $rawdata, $low))
$volumepattern = "((.*))";
if (eregi($volumepattern, $rawdata, $volume))
?>
On Tue, 5 Mar 2002, Craig Westerman wrote:
> I'm retrieving data from a data service.
> This is the ENTIRE source code of the URL they let me recei
I'm retrieving data from a data service.
This is the ENTIRE source code of the URL they let me receive:
RHAT
6.82
3/4/2002
3:59pm
0.32
6.59
6.99
6.53
932400
How can I insert the data values into an array ?
Thanks
Craig ><>
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net
I'm retrieving data from a service. The data is in the following format.
RHAT
6.82
3/4/2002
3:59pm
0.32
6.59
6.99
6.53
932400
How can I insert the data values into an array?
Thanks
Craig ><>
[EMAIL PROTECTED]
quote=RHAT&submitquote=Get+Quote
How do I get rid of the extra&submitquote=Get+Quote in the URL?
Why is enter and submit acting differently?
Thanks
Craig ><>
[EMAIL PROTECTED]
-Original Message-
From: Tom Rogers [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 04, 2002
Thanks Donald,
I tried that before and this is URL returnedquotestest.php?quote=
Craig ><>
[EMAIL PROTECTED]
-Original Message-
From: Greg Donald [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 04, 2002 7:17 PM
To: Craig Westerman
Cc: php-general-list
Subject: Re: [
The above form passes $quote to the page quotestest.php
How can I also pass the $quote to the URL so that the page with variable can
be bookmarked?
Do I have to modify both pages or just the input form?
Thanks
Craig ><>
[EMAIL PROTECTED]
-Original Message-
From: Bas Jobsen [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 04, 2002 8:55 AM
To: Craig Westerman; php-general-list
Subject: Re: [PHP] Real world regex
> For another I need to get the 3rd opening table row tag after the 7th
> opening tag.
not tested:
&quo
I'm trying to understand how to write a regex when the only pattern is table
tags.
For one I need to figure out how to match the opening tag of the 4th
html table on a page.
For another I need to get the 3rd opening table row tag after the 7th
opening tag.
Thanks
Craig ><>
[EMAIL PROTECTE
Here is three excellent tutorials. Follow through each, step by step and you
will be in the game.
Building a Database-Driven Web Site Using PHP and MySQL
http://www.mysql.com/articles/ddws/index.html
Introduction to MySQL: A MySQL Tutorial
http://www.mysql.com/documentation/mysql/bychapter/manua
How can I use fopen to retrieve just one html table out of a whole web page.
I need to extract just this table (shown below) from this web page:
http://quotes.nasdaq.com/quote.dll?page=multi&mode=stock&symbol=drooy
Thanks Craig
***
while ($file_name = readdir($dir))
if (($file_name != ".") && ($file_name != ".."))
$file_list .= "$file_name";
}
This excludes . and .. files. How would I exclude files that contained
pv.
Thus filenamepv.html would be excluded, but filename.html would not?
Thanks
Craig ><>
[EMAIL PROT
M
To: 'Craig Westerman'; php-general-list
Subject: RE: [PHP] mysql php - while loops
with a bit of cheating... use a table...
(nb: this code not tested, but logic has)
"
?>
-
-
";
$i++;
}
?>
-Original Message-
From: Craig Westerman [mailto:[EMAIL PROTECTE
Is it possible to run PHP on a Pocket PC?
Thanks CW
The following lists 12 items from a fruits table.
$results = mysql_query("SELECT ID, date, appleprice, orangeprice, pearprice
FROM fruits");
while ($data = mysql_fetch_array($results))
{
?>
- -
-
<>
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
3. mysql_query("SELECT * FROM table WHERE date < '$mydate'"); # where date
is older
4.mysql_query("SELECT * FROM table WHERE date BETWEEN '$myfirstdate' AND
'$myseconddate'"); # where date is between 2 dates
Hope this helps, Joe :)
&quo
$query = ""
mysql_query("SELECT * FROM table WHERE date LIKE '%". $query ."%'");
// returns all items in database
$query = "2001-01-01"
mysql_query("SELECT * FROM table WHERE date LIKE '%". $query ."%'");
// returns all rows that have 2001-01-01 as the date
What is proper way to define a varia
I have a very wide panoramic image I want to display on a page. I don't want
to side scroll the page, only the image. Is there a way to make a image side
scrollable using PHP?
Thanks
Craig ><>
[EMAIL PROTECTED]
I'm reading a book and have a little confusion in my mind.
Consider the following table. Assume that I grabbed it from another web site
using:
http://www.abc123xyz.com';
$lines_array = file($url);
$lines_string = implode('', $lines_array);
?>
===
banana
.46
Consider the following table that I grabbed from another web site using:
http://www.abc123xyz.com';
$lines_array = file($url);
$lines_string = implode('', $lines_array);
?>
===
banana
.46
.55
pear
.38
.51
apple
.59
>I'm wanting to chart the server load average data displayed when you run
The correct way to do that would be to read it straight from the source,
(eg. /proc/loadav for linux with procfs).
That would be much quicker, and it would also save your server a fork
for each reading (unless you are runni
>>Does anyone here have a script to run uptime every ten minutes or so, log
>>output, then display daily output in a nice friendly chart?
>Seems a bit daft running it every ten minutes, as a server should be up
24/7,
>how do you plan to check it otherwise?
I'm wanting to chart the server load a
Does anyone here have a script to run uptime every ten minutes or so, log
output, then display daily output in a nice friendly chart?
Thanks
Craig ><>
[EMAIL PROTECTED]
I found this little script called grab'n & pars'n on the net. It looks like
it could be very useful to learn how it does what it does. While studying it
I came up with a question.
http://www.php.net';
$lines_array = file($url);
$lines_string = implode('', $lines_array);
eregi("(.*)", $lines_strin
OPen the file and read in the required number of characters (short
explanation). Have a look at the file handling functions.
--
David Robley
Thanks David,
I came up with this, but it doesn't work. Does text file need to be in a
special format? It is 4 paragraphs of plain text created in notepa
43 matches
Mail list logo