[PHP] copy ...

2003-03-16 Thread John Taylor-Johnston
I need to process the contents of 

SU: something ... blah blah¶
TI: Title ... asasa asasas asas¶
AU: author field ... asasasas¶


I want to filter $textarea. I need to change my code below to grab everything between 
"TI:" and "¶", but not including "¶" :

I have this code.

snip

filter_strings("TI: ", $textarea)

function filter_strings($tofilter,$line){
if(eregi('^'.$tofilter.' (.*)$',$line,$m)) {
$filtered=$m[1];
return $filtered;
 }
}


--
John Taylor-Johnston
-
Université de Sherbrooke:
http://compcanlit.ca/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Arrays

2003-03-16 Thread John Taylor-Johnston
Thanks!

"John W. Holmes" wrote:

> > $var = array (
> > 'AN' => array (
> >   'Description' => 'Accession Number: (AN)',
> >   'ReferenceURL' => 'AN__Accession_Number.jsp',
> >   ),
> >  'AU' => array (
> >   'Description' => 'Author(s): (AU)',
> >   'ReferenceURL' => 'AU__Author(s).jsp',
> >   )
> > )
> >
> > What I want to get is the keys 'AN' and 'AU' as values.
> >
> > while (??){
> > echo "This key is $var[??]";
> > }
> >
> > This key is AN
> > This key is AU
>
> foreach($var as $key => $value)
> { echo "The key is $key"; }
>
> ---John W. Holmes...
>
> PHP Architect - A monthly magazine for PHP Professionals. Get your copy
> today. http://www.phparch.com/

--
John Taylor-Johnston
-
"If it's not open-source, it's Murphy's Law."

  ' ' '   Collège de Sherbrooke:
 ô¿ô   http://www.collegesherbrooke.qc.ca/languesmodernes/
   - Université de Sherbrooke:
  http://compcanlit.ca/
  819-569-2064



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] File System

2003-03-16 Thread Philip J. Newman
how about just 

   if (file_exists($dest_file)) {
   unlink ($dest_file);

 }

- Original Message - 
From: "Charles Kline" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 17, 2003 6:04 PM
Subject: Re: [PHP] File System


> $result = unlink("file.txt") or die("Operation failed!');
> 
> On Monday, March 17, 2003, at 12:58 AM, Philip J. Newman wrote:
> 
> > How do i delete a file  ... ?
> >
> > kill?? dele *srugs*
> >
> > --
> > Philip J. Newman.
> > Head Developer
> > [EMAIL PROTECTED]
> >
> > +64 (9) 576 9491
> > +64 021-048-3999
> >
> >
> > -- 
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] File System

2003-03-16 Thread Charles Kline
$result = unlink("file.txt") or die("Operation failed!');

On Monday, March 17, 2003, at 12:58 AM, Philip J. Newman wrote:

How do i delete a file  ... ?

kill?? dele *srugs*

--
Philip J. Newman.
Head Developer
[EMAIL PROTECTED]
+64 (9) 576 9491
+64 021-048-3999
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] File System

2003-03-16 Thread Charles Kline
On Monday, March 17, 2003, at 12:58 AM, Philip J. Newman wrote:

How do i delete a file  ... ?

kill?? dele *srugs*

--
Philip J. Newman.
Head Developer
[EMAIL PROTECTED]
+64 (9) 576 9491
+64 021-048-3999
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] File System

2003-03-16 Thread Philip J. Newman
How do i delete a file  ... ?

kill?? dele *srugs*

--
Philip J. Newman.
Head Developer
[EMAIL PROTECTED]

+64 (9) 576 9491
+64 021-048-3999


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Using PHP to get a word count of a MSword doc

2003-03-16 Thread John W. Holmes
> I have a mySQL DB that stores word documents (as a BLOB). I am trying
to
> find a way of doing a word count on the documents using PHP. Can
anyone
> help??

Look at this:

http://www.winfield.demon.nl/index.html

to convert it to text and then count words. I just did a quick search to
find the above link; I have no idea about the program. There may be
better ones out there...

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Using PHP to get a word count of a MSword doc

2003-03-16 Thread Brad Wright
Hi all,

I have a mySQL DB that stores word documents (as a BLOB). I am trying to
find a way of doing a word count on the documents using PHP. Can anyone
help??

Thanks in advance,
Brad


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] RE: muliple form array values

2003-03-16 Thread John W. Holmes
> hi guys i have multiple media to update in an entry for instance
> 
> 
> 
> where 123 is the fileid of the media in the database , how could i
> possibly
> loop through the post vars of fileedit and get each entry to update ?
> 
> 
> 
> 
> so therefore i could have something like this , loop through and
update id
> 123
> and update 124 ?

foreach($_POST['fileedit']['title'] as $key=>$value)
{
//$key will be 123, 124, etc...
//$value will be whatever was entered in text box
}

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Log file details required !! Help

2003-03-16 Thread Monil Chheda
Hi,

I need to get some details from a LOG file as to which
keywords are used...

I have attached the LOG file.

I heed the details of the following:-

1. Ip Address
2. Date
3. The page that was requested
4. KeyWords used by the Search Engine [ Google / Yahoo
seperated ]
(ordered BY DATE) in a tabular FORMAT

I am using the following CODE.. But , it doesnt work .
Am I MISSING SOMETHING ?







Could any one please help me 

Thanks...

-Monil Chheda
http://services.eliteral.com


=
Best Regards,
Monil Chheda(INDIA)
http://domains.eliteral.com
===
===

__
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com

web.zip
Description: web.zip
-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: permission problem - i guess

2003-03-16 Thread gamin
Here are the outputs from the phpinfo() (called directly from ./u.php and
called from /var/www/html/test.php which executes u.php). Note that the
section on mysql is missing in the latter.

<--- from u.php --- >
phpinfo()
PHP Version => 4.3.0

System => Linux localhost.localdomain 2.4.7-10 #1 Thu Sep 6 17:27:27 EDT
2001 i686
Build Date => Jan 15 2003 22:25:35
Configure Command =>  './configure' '--prefix=/usr' '--exec-prefix=/usr'
'--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc'
'--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib'
'--libexecdir=/usr/libexec' '--localstatedir=/var'
'--sharedstatedir=/usr/com' '--mandir=/usr/share/man'
'--infodir=/usr/share/info' '--prefix=/usr' '--with-config-file-path=/etc'
'--disable-debug' '--with-pic' '--disable-rpath'
'--enable-inline-optimization' '--with-bz2' '--with-exec-dir=/usr/bin'
'--with-freetype-dir=/usr' '--with-gd' '--with-gdbm' '--with-gettext'
'--with-jpeg-dir=/usr' '--with-mm' '--with-openssl' '--with-png'
'--with-regex=system' '--with-ttf' '--with-xml' '--with-expat-dir=/usr'
'--with-zlib' '--with-layout=GNU' '--enable-bcmath' '--enable-debugger'
'--enable-ftp' '--enable-magic-quotes' '--enable-safe-mode'
'--enable-sockets' '--enable-sysvsem' '--enable-sysvshm'
'--enable-track-vars' '--enable-yp' '--enable-wddx' '--with-ldap=shared'
'--with-mysql=shared' '--with-apxs=/usr/sbin/apxs'
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /etc/php.ini
PHP API => 20020918
PHP Extension => 20020429
Zend Extension => 20021010
Debug Build => no
Thread Safety => disabled
Registered PHP Streams => php, http, ftp, https, ftps, compress.bzip2,
compress.zlib


This program makes use of the Zend Scripting Language Engine:
Zend Engine v1.3.0, Copyright (c) 1998-2002 Zend Technologies


 ___


Configuration

PHP Core

Directive => Local Value => Master Value
allow_call_time_pass_reference => Off => Off
allow_url_fopen => On => On
always_populate_raw_post_data => Off => Off
arg_separator.input => & => &
arg_separator.output => & => &
asp_tags => Off => Off
auto_append_file => no value => no value
auto_prepend_file => no value => no value
browscap => no value => no value
default_charset => no value => no value
default_mimetype => text/html => text/html
define_syslog_variables => Off => Off
disable_functions => no value => no value
display_errors => On => On
display_startup_errors => Off => Off
doc_root => no value => no value
docref_ext => no value => no value
docref_root => http://www.php.net/ => http://www.php.net/
enable_dl => On => On
error_append_string => no value => no value
error_log => /usr/local/bin/pima/reports/php_errors/interpreter_errors =>
/usr/local/bin/pima/reports/php_errors/interpreter_errors
error_prepend_string => no value => no value
error_reporting => 2047 => 2047
expose_php => On => On
extension_dir => /root/php-4.3.0/php-4.3.0/modules =>
/root/php-4.3.0/php-4.3.0/modules
file_uploads => On => On
gpc_order => GPC => GPC
highlight.bg => #FF => #FF
highlight.comment => #FF8000 => #FF8000
highlight.default => #BB => #BB
highlight.html => #00 => #00
highlight.keyword => #007700 => #007700
highlight.string => #DD => #DD
html_errors => Off => On
ignore_repeated_errors => Off => Off
ignore_repeated_source => Off => Off
ignore_user_abort => Off => Off
implicit_flush => On => Off
include_path =>
.:/php/includes:/usr/share/pear:/usr/local/bin/pima/sysdata:/usr/local/bin/p
ima/reports =>
.:/php/includes:/usr/share/pear:/usr/local/bin/pima/sysdata:/usr/local/bin/p
ima/reports
log_errors => On => On
log_errors_max_len => 1024 => 1024
magic_quotes_gpc => Off => Off
magic_quotes_runtime => Off => Off
magic_quotes_sybase => Off => Off
max_execution_time => 0 => 30
max_input_time => 60 => 60
open_basedir => no value => no value
output_buffering => no value => no value
output_handler => no value => no value
post_max_size => 8M => 8M
precision => 14 => 14
register_argc_argv => On => Off
register_globals => Off => Off
report_memleaks => On => On
safe_mode => Off => Off
safe_mode_exec_dir => no value => no value
safe_mode_gid => Off => Off
safe_mode_include_dir => no value => no value
sendmail_from => [EMAIL PROTECTED] => [EMAIL PROTECTED]
sendmail_path => /usr/sbin/sendmail -t -i  => /usr/sbin/sendmail -t -i
short_open_tag => On => On
SMTP => localhost => localhost
smtp_port => 25 => 25
sql.safe_mode => Off => Off
track_errors => On => On
unserialize_callback_func => no value => no value
upload_max_filesize => 2M => 2M
upload_tmp_dir => no value => no value
user_dir => no value => no value
variables_order => GPCS => GPCS
xmlrpc_error_number => 0 => 0
xmlrpc_errors => Off => Off
y2k_compliance => On => On

bcmath

BCMath support => enabled

bz2

BZip2 Support => Enabled
BZip2 Version => 1.0.1, 23-June-2000

ctype

ctype functions => enabled

dba

DBA support => enabled
Supported han

[PHP] RE: muliple form array values

2003-03-16 Thread daniel
hi guys i have multiple media to update in an entry for instance



where 123 is the fileid of the media in the database , how could i possibly 
loop through the post vars of fileedit and get each entry to update ?




so therefore i could have something like this , loop through and update id 123 
and update 124 ?



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] upload file size corruption?

2003-03-16 Thread Rasmus Lerdorf
> I am going nuts reinstalling over and over again on different computers
> and keep getting this error.  I am using 2.0.40 http (I know
> experimental, but don't tell me that :) )

Why not?  Since this is the problem.  Upgrade to Apache 1.3.27 and
everything will be fine.

-Rasmus


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] upload file size corruption?

2003-03-16 Thread Ronald Petty
I was wondering if php has a bug or is it apache, and how to determine
which it it.  Every file I upload to my server, I print the file size
and it is twice the normal file size?  Any idea what is going on, text
files "look" ok, images are all screwed up, large text files are messed
up too actually?

I am going nuts reinstalling over and over again on different computers
and keep getting this error.  I am using 2.0.40 http (I know
experimental, but don't tell me that :) )

Any ideas?  Just want to know if its php or apache that is the problem. 
If both thats ok, just need to know.
Thanks
Ron


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Access DB & PHP

2003-03-16 Thread John W. Holmes
> I have a client who insists on using PHP and an Access database.  He
> describes a problem with the access databases becoming locked when a
user
> clicks 'stop' in their browser whilst downloading the page (and I have
to
> stop the IIS server to release it).  I have absolutely no experience
with
> PHP/Access connections, so I thought I'd ding it along and see if the
> elite
> PHP programmers of the world can pick up an error in his code.
> 
> >
> > I connect like this:
> > $conn = new COM ('ADODB.Connection');
> > $conn->Open ("Provider=Microsoft.Jet.OLEDB.4.0; Data
> > Source='c:\\home\\westir\\data\\libcat.mdb'");
> > $sql = "SELECT * FROM tbl_name ";
> > $result = $conn->Execute($sql);
> >
> > // deal with the database generated information
> >
> > $result->Close()
> > $conn->Close
> 
> Is there a better way to do this?

Have a look at register_shutdown_function() to ensure that your database
connection is closed, whether the script ends or is stopped or whatever.

www.php.net/register_shutdown_function

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Access DB & PHP

2003-03-16 Thread Bob Irwin
Hi guys,

I have a client who insists on using PHP and an Access database.  He
describes a problem with the access databases becoming locked when a user
clicks 'stop' in their browser whilst downloading the page (and I have to
stop the IIS server to release it).  I have absolutely no experience with
PHP/Access connections, so I thought I'd ding it along and see if the elite
PHP programmers of the world can pick up an error in his code.

>
> I connect like this:
> $conn = new COM ('ADODB.Connection');
> $conn->Open ("Provider=Microsoft.Jet.OLEDB.4.0; Data
> Source='c:\\home\\westir\\data\\libcat.mdb'");
> $sql = "SELECT * FROM tbl_name ";
> $result = $conn->Execute($sql);
>
> // deal with the database generated information
>
> $result->Close()
> $conn->Close

Is there a better way to do this?


Best Regards
Bob Irwin
Server Admin & Web Programmer
Planet Netcom


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] regex problem

2003-03-16 Thread John W. Holmes
> suppose there's a string
> $string="I like my(hot) coffee with sugar and (milk)(PHP)";
> 
> I would like to get an output of all possible combinations of the
sentence
> with the words between brackets:
> eg.
> I like my hot coffee with sugar and
> I like my hot coffee with sugar and milk
> I like my hot coffee with sugar and milk php
> I like my coffee with sugar and
> I like my coffee with sugar and milk php
> etc.etc.
> 
> The number of the words between brackets can differ and they can occur
> everywhere. The most important is that all combinations are returned
but
> the
> sentence (not between brackets) should be there.

Here's a solution. :) Hope it helps. You could adapt it to not use the
placeholders if each word in parenthesis is unique. 

 where 'x' is incremented
//for each placeholder
$a=0;
$text2 = preg_replace("/\((.*)\)/Ue",'sprintf("<#%d#>",$a++)',$text);

//determine how many words were matched
//and what decimal number equals a binary 
//number of all ones and a length equal to
//the number of matches
$num_matches = count($matches[0]);
$dec = bindec(str_repeat("1",$num_matches));

//Original text
echo $text . "";

for($x=0;$x<=$dec;$x++)
{
$text3 = $text2;
$cpy = $x;
//loop equal to the number of matched words
for($y=0;$y<$num_matches;$y++)
{
//if least significant bit is one then
//replace placeholder with word from $matches
//otherwise an empty string
$replace = ($cpy & 1) ? $matches[1][$y] : '';
$text3 = str_replace("<#$y#>",$replace,$text3);
//shift bits in $cpy one to the right
$cpy = $cpy >> 1;
}
echo $text3 . "";
}

?>

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Really simple string search question

2003-03-16 Thread Coert Metz
You can use strstr, stristr, strpos or regular expressions.
Maybe it's good to check the manual at php.net first before asking
a question ;)
Coert Metz

Kevin - Kd Micro Software wrote:
Hello all,

This is probably a really easy thing to answer but I don't know what the
answer is so if you lot could help me I would appreciate it.
Here's 3 examples:
$var="www.google.com";
$var="blah blah google blah";
$var="google rules";
Now I just want to see if $var contains the word 'google' in it - which all
3 of the above do.
Is there a way to do this?

Kevin Green
KD Micro Software
E-Mail: [EMAIL PROTECTED]
Internet: http://www.kdmicro.com.au



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Really simple string search question

2003-03-16 Thread Kevin - KD Micro Software
Excellent, thank you for your quick response John.


Kevin Green
KD Micro Software

E-Mail: [EMAIL PROTECTED]
Internet: http://www.kdmicro.com.au


- Original Message -
From: "John W. Holmes" <[EMAIL PROTECTED]>
To: "'Kevin - KD Micro Software'" <[EMAIL PROTECTED]>; "'PHP List'"
<[EMAIL PROTECTED]>
Sent: Monday, March 17, 2003 8:58 AM
Subject: RE: [PHP] Really simple string search question


> > Here's 3 examples:
> > $var="www.google.com";
> > $var="blah blah google blah";
> > $var="google rules";
> >
> > Now I just want to see if $var contains the word 'google' in it -
> which
>
> www.php.net/strstr
>
> ---John W. Holmes...
>
> PHP Architect - A monthly magazine for PHP Professionals. Get your copy
> today. http://www.phparch.com/
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Really simple string search question

2003-03-16 Thread John W. Holmes
> Here's 3 examples:
> $var="www.google.com";
> $var="blah blah google blah";
> $var="google rules";
> 
> Now I just want to see if $var contains the word 'google' in it -
which

www.php.net/strstr

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: help me please

2003-03-16 Thread Coert Metz
Hi

Look at http://www.nusphere.com/
Here you can download apache, mysql, php and more with
an easy to use install programm for free.
It works nice for me!

Coert Metz

Blair Robinson wrote:
Hello,
 I am making a web site i just want to be able to view my php outputs On my Computer how do i do this i have downlaoded the 1mb windows php installer. and have the zipped version(4.3.0) that is 4mb I have windows xp. Can you please point me in the right direction or give me some answers on how to view my pages.
 
 Thanks
 Blair.



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Really simple string search question

2003-03-16 Thread Kevin - KD Micro Software
Hello all,

This is probably a really easy thing to answer but I don't know what the
answer is so if you lot could help me I would appreciate it.

Here's 3 examples:
$var="www.google.com";
$var="blah blah google blah";
$var="google rules";

Now I just want to see if $var contains the word 'google' in it - which all
3 of the above do.
Is there a way to do this?


Kevin Green
KD Micro Software

E-Mail: [EMAIL PROTECTED]
Internet: http://www.kdmicro.com.au



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: fopen

2003-03-16 Thread Coert Metz
Hi

If i'm reading your code in the right way, i think
you can better use the file_exists function available
in php
Read the manual at:
http://www.php.net/manual/nl/function.file-exists.php
Many success

Coert Metz

Sebastian wrote:
hello,

i have this snippet of code, from what i can tell it works .. just wondering
if i am doing it in a correct way, or if there is a better, or faster way.
thanks for any input.
$fp = @fopen("$_SERVER[DOCUMENT_ROOT]/images/$mapname.jpg","r");

if ( $fp )
 {
 $mappic = "";
 }
@fclose ( $fp );
echo $mappic;

cheers,
- Sebastian


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] help me please

2003-03-16 Thread Bryan Brannigan
download and install the apache web server.  that along with php should do
the trick.  if you're doing any database work you may want to pick up the
windows version of that too.

some decent instructions are here:
http://www.thesitewizard.com/archive/php4install.shtml

-Original Message-
From: Blair Robinson [mailto:[EMAIL PROTECTED]
Sent: Sunday, March 16, 2003 7:47 PM
To: [EMAIL PROTECTED]
Subject: [PHP] help me please


Hello,
 I am making a web site i just want to be able to view my php outputs On my
Computer how do i do this i have downlaoded the 1mb windows php installer.
and have the zipped version(4.3.0) that is 4mb I have windows xp. Can you
please point me in the right direction or give me some answers on how to
view my pages.

 Thanks
 Blair.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] help me please

2003-03-16 Thread Blair Robinson
Hello,
 I am making a web site i just want to be able to view my php outputs On my Computer 
how do i do this i have downlaoded the 1mb windows php installer. and have the zipped 
version(4.3.0) that is 4mb I have windows xp. Can you please point me in the right 
direction or give me some answers on how to view my pages.
 
 Thanks
 Blair.


Re: [PHP] fopen

2003-03-16 Thread Sebastian
not a bad idea, thanks, I will do just that.

cheers,
- Sebastian

+- Original Message -+
said by: "John W. Holmes"


| > i have this snippet of code, from what i can tell it works .. just
| > wondering
| > if i am doing it in a correct way, or if there is a better, or faster
| way.
| > thanks for any input.
| > 
| > $fp = @fopen("$_SERVER[DOCUMENT_ROOT]/images/$mapname.jpg","r");
| > 
| > if ( $fp )
| >  {
| >  $mappic = " }
| > else
| >  {
| >  $mappic = "";
| > 
| >  }
| > @fclose ( $fp );
| > 
| > echo $mappic;
| 
| How about using file_exists() to check, rather than trying to open it?
| 
| ---John W. Holmes...


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Function or GD problem?

2003-03-16 Thread Hugh Danaher
Can't tell for sure, but you might have one more closing bracket than
needed.  my suggestion to call it from an href rather than as an img tag was
based upon the fact that the href tag will show an error message whereas the
img tag won't.
Hugh
- Original Message -
From: "Nate" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, March 16, 2003 3:59 PM
Subject: Re: [PHP] Function or GD problem?


> Hi, thanks for your help but im not sure what you mean. My image php page
is
> http://www.maxamplify.com/maxgallery/admin/test.php?src=img.jpg This
> contains the exact same code I posted below.
>
> However if i make that into a function it gives me a red X as you can see
> here: http://www.maxamplify.com/maxgallery/admin/test1.php?src=img.jpg
>
> Just to clarify, im doing a function like
> --
> function ResizeJPG($src) {
>
>global $full_img_url;
>//code below
>
> }
>
> ResizeJPG($src);
> --
>
> Thanks for your help!
> Nate
>
>
> "Hugh Danaher" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>
> > In the receiving page, change your link from an  tag to an  > href= > then see what the error message says.
> > Hugh
>
> > - Original Message -
> > From: "Nate" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Sunday, March 16, 2003 2:55 PM
> > Subject: [PHP] Function or GD problem?
> >
> >
> > > Function or GD problem...
> > > I have a strange problem here, hoping someone can help.
> > >
> > > The following code works great but when I make it into a function it
> > doesn't
> > > error but it gives a RED X image.
> > >
> > > PHP:
> > >  > >
> > > include("functions.inc.php");
> > >
> > > $size = getimagesize("uploads/$src");
> > >
> > > if ($size[2]==2) {
> > >
> > >$sourceimg = imagecreatefromjpeg("$full_img_url/$src") OR
> DIE("DIED");
> > >
> > >
> > >if($size[0]<$size[1]) {
> > >
> > >   if($size[1]<$height) { $height1=$size[1]; } else {
> > $height1=$height; }
> > >
> > >   $width1=($size[0]*$height1)/$size[1];
> > >
> > >} else {
> > >
> > >   if($size[0]<$width) { $width1=$size[0]; } else {
$width1=$width; }
> > >
> > >   $height1=($size[1]*$width1)/$size[0];
> > >
> > >}
> > >
> > >Header("Content-type: image/jpeg");
> > >
> > >$destimg = imagecreatetruecolor($width1,$height1) OR DIE("DIED");
> > >
> > >//Try to resample (needs GD 2)
> > >if(imagecopyresampled($destimg, $sourceimg, 0,0,0,0, $width1,
> $height1,
> > > $size[0], $size[1])) {
> > >
> > >} elseif(imagecopyresized($destimg, $sourceimg, 0,0,0,0, $width1,
> > > $height1, $size[0], $size[1])) {
> > >
> > >} else {
> > >   //HTML RESIZE
> > >}
> > >
> > >imagejpeg($destimg,'',76) OR DIE("DIED");
> > >imagedestroy($destimg) OR DIE("DIED");
> > >
> > >}
> > >
> > > }
> > >
> > > ?>
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] fopen

2003-03-16 Thread John W. Holmes
> i have this snippet of code, from what i can tell it works .. just
> wondering
> if i am doing it in a correct way, or if there is a better, or faster
way.
> thanks for any input.
> 
> $fp = @fopen("$_SERVER[DOCUMENT_ROOT]/images/$mapname.jpg","r");
> 
> if ( $fp )
>  {
>  $mappic = " }
> else
>  {
>  $mappic = "";
> 
>  }
> @fclose ( $fp );
> 
> echo $mappic;

How about using file_exists() to check, rather than trying to open it?

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Non systems-wide auto_prepend_file

2003-03-16 Thread CodersNightMare
php_value auto_prepend_file /home/www/www.virtual.com/php/prepend.php

php_value auto_append_file /home/www/www.virtual.com/php/append.php

OR:

php_admin_value auto_prepend_file your_file_name.php
php_admin_value auto_append_file your_file_name.php
I think that one or the other should work in the .htaccess file and in a 
virtualhost.

Most of the time, I see this kind of listing in a .htaccess file and not a 
virtualhost as most of the time, the customers for the Webhost I work for 
do not have access to the virtualhost entry.

Hope this helps.

At 10:36 AM 3/17/2003 +1100, you wrote:
Is there any way anyone can think of to set up
auto_prepend_file/auto_append_file so that they only affect one virtual
domain on an Apache webserver (not system wide)?
Cheers,
Brad
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] fopen

2003-03-16 Thread Sebastian
hello,

i have this snippet of code, from what i can tell it works .. just wondering
if i am doing it in a correct way, or if there is a better, or faster way.
thanks for any input.

$fp = @fopen("$_SERVER[DOCUMENT_ROOT]/images/$mapname.jpg","r");

if ( $fp )
 {
 $mappic = "";

 }
@fclose ( $fp );

echo $mappic;


cheers,
- Sebastian


Re: [PHP] Function or GD problem?

2003-03-16 Thread Nate
Hi, thanks for your help but im not sure what you mean. My image php page is
http://www.maxamplify.com/maxgallery/admin/test.php?src=img.jpg This
contains the exact same code I posted below.

However if i make that into a function it gives me a red X as you can see
here: http://www.maxamplify.com/maxgallery/admin/test1.php?src=img.jpg

Just to clarify, im doing a function like
--
function ResizeJPG($src) {

   global $full_img_url;
   //code below

}

ResizeJPG($src);
--

Thanks for your help!
Nate


"Hugh Danaher" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]

> In the receiving page, change your link from an  tag to an  href= > then see what the error message says.
> Hugh

> - Original Message -
> From: "Nate" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Sunday, March 16, 2003 2:55 PM
> Subject: [PHP] Function or GD problem?
>
>
> > Function or GD problem...
> > I have a strange problem here, hoping someone can help.
> >
> > The following code works great but when I make it into a function it
> doesn't
> > error but it gives a RED X image.
> >
> > PHP:
> >  >
> > include("functions.inc.php");
> >
> > $size = getimagesize("uploads/$src");
> >
> > if ($size[2]==2) {
> >
> >$sourceimg = imagecreatefromjpeg("$full_img_url/$src") OR
DIE("DIED");
> >
> >
> >if($size[0]<$size[1]) {
> >
> >   if($size[1]<$height) { $height1=$size[1]; } else {
> $height1=$height; }
> >
> >   $width1=($size[0]*$height1)/$size[1];
> >
> >} else {
> >
> >   if($size[0]<$width) { $width1=$size[0]; } else { $width1=$width; }
> >
> >   $height1=($size[1]*$width1)/$size[0];
> >
> >}
> >
> >Header("Content-type: image/jpeg");
> >
> >$destimg = imagecreatetruecolor($width1,$height1) OR DIE("DIED");
> >
> >//Try to resample (needs GD 2)
> >if(imagecopyresampled($destimg, $sourceimg, 0,0,0,0, $width1,
$height1,
> > $size[0], $size[1])) {
> >
> >} elseif(imagecopyresized($destimg, $sourceimg, 0,0,0,0, $width1,
> > $height1, $size[0], $size[1])) {
> >
> >} else {
> >   //HTML RESIZE
> >}
> >
> >imagejpeg($destimg,'',76) OR DIE("DIED");
> >imagedestroy($destimg) OR DIE("DIED");
> >
> >}
> >
> > }
> >
> > ?>
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Non systems-wide auto_prepend_file

2003-03-16 Thread Brad Hubbard
Is there any way anyone can think of to set up 
auto_prepend_file/auto_append_file so that they only affect one virtual 
domain on an Apache webserver (not system wide)?

Cheers,
Brad

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Function or GD problem?

2003-03-16 Thread Hugh Danaher
In the receiving page, change your link from an  tag to an  then see what the error message says.
Hugh
- Original Message -
From: "Nate" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, March 16, 2003 2:55 PM
Subject: [PHP] Function or GD problem?


> Function or GD problem...
> I have a strange problem here, hoping someone can help.
>
> The following code works great but when I make it into a function it
doesn't
> error but it gives a RED X image.
>
> PHP:
> 
> include("functions.inc.php");
>
> $size = getimagesize("uploads/$src");
>
> if ($size[2]==2) {
>
>$sourceimg = imagecreatefromjpeg("$full_img_url/$src") OR DIE("DIED");
>
>
>if($size[0]<$size[1]) {
>
>   if($size[1]<$height) { $height1=$size[1]; } else {
$height1=$height; }
>
>   $width1=($size[0]*$height1)/$size[1];
>
>} else {
>
>   if($size[0]<$width) { $width1=$size[0]; } else { $width1=$width; }
>
>   $height1=($size[1]*$width1)/$size[0];
>
>}
>
>Header("Content-type: image/jpeg");
>
>$destimg = imagecreatetruecolor($width1,$height1) OR DIE("DIED");
>
>//Try to resample (needs GD 2)
>if(imagecopyresampled($destimg, $sourceimg, 0,0,0,0, $width1, $height1,
> $size[0], $size[1])) {
>
>} elseif(imagecopyresized($destimg, $sourceimg, 0,0,0,0, $width1,
> $height1, $size[0], $size[1])) {
>
>} else {
>   //HTML RESIZE
>}
>
>imagejpeg($destimg,'',76) OR DIE("DIED");
>imagedestroy($destimg) OR DIE("DIED");
>
>}
>
> }
>
> ?>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: using strcmp()

2003-03-16 Thread Anthony Ritter
Justin Garrett wrote:
> You were missing a semicolon:
> $result=strcmp($firstword, $secondword);
...

Thank you Justin and all other.
TR




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] MYSQL SQL Statement Question

2003-03-16 Thread AzFLSite
Is there a way to search 3 tables or more at once
and return all information that it finds? If I do a
inner join it will only return if there are matches in
the tables. If I do just a left join it returns the
left if nothing in the right is found and visa versa
for a right. Im using a unique id btw to search for
any
matches in the 3 tables. So in english I want to:

Search 3 tables at once trying to find any field
matching a number I pass to the query. Even if no
info is found in table 1 or table 3 I still want to
return the information in table 2 since there was a
match found. How can I do that? BTW Im using mysql
3.23x

Thanks
Silly

__
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Function or GD problem?

2003-03-16 Thread Nate
Function or GD problem...
I have a strange problem here, hoping someone can help.

The following code works great but when I make it into a function it doesn't
error but it gives a RED X image.

PHP:




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] RE: ignore html

2003-03-16 Thread John W. Holmes
> hi guys trikky question , i would like to ignore html in content that
i am
> replacing news lines with page breaks , how is it possible ? at the
moment
> and
> new line like so \r\n in content will be replaced with a  but
happens
> to
> work on say tables tags within the content aswell and need to ignore
this.

You'll have to make your own function that only matches data between
 and  (or whatever you're looking for) and then applies nl2br()
only to that section...

For example:

preg_replace("!(.*)!Ues","nl2br('$1')",$var);

will match only what's between  and  tags and apply nl2br() to
the data. It will leave everything else along. Adapt to your needs,
there may be better methods...

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] passing values from one script to another script

2003-03-16 Thread John W. Holmes
> I want to pass a value, which came from a HTML form, to another PHP
> script. How can i do this?
> 
> e.g.: $login - the value of this varriable is came from LOGIN.HTML to
> LOGIN.PHP. How can i pass the value of $login from LOGIN.PHP to
> PROCESS.PHP?

The easiest way is with a session. Remember, each request is unique, so
if you want to carry something over, you have to include it in the next
request. This means adding it to the URL ($_GET) or adding it to a form
($_POST), adding it to a cookie ($_COOKIE), or putting it in the session
($_SESSION).

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Scrolling through values sent from a form[scanned]

2003-03-16 Thread John W. Holmes
Don't rely on checkboxes. If they are not checked, as you've found out I
think, then the value is not set at all. Use a hidden value to carry
over a key for each field, then check the checkbox to see whether it was
checked or not. 

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/

> -Original Message-
> From: shaun [mailto:[EMAIL PROTECTED]
> Sent: Sunday, March 16, 2003 1:16 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Scrolling through values sent from a form
> 
> Hi,
> 
> i have a form on a page which is built dynamically and consists of
fields
> in
> a certain table and checkboxes. The puropse of the form is to update
the
> the
> status of a table called CMS_FIELDS which stores data of all the
fields
> for
> all the tables in the database.
> 
> Using the following code i am attempting to update the table depending
on
> whether the boxes have been ticked or not, but the script only outputs
> values of the boxes that have been ticked. (the data isn't being
updated
> yet
> i am just printing it to the screen for testing purposes).
> 
>   if(isset($update_fields)==true){
>$fields='';
>$values='';
>foreach ($_POST as $key => $val) {
>  $fields[] = $key;
>  $values[] = $val;
>}
>$i=0;
>foreach ($fields as $val){
> if ($values[$i] == "on"){
>  $query = "UPDATE CMS_FIELDS SET cms_fields_is_editable = '1'
>WHERE cms_table_name = '$_GET[table_name]' AND
> cms_field_name
> = '".$fields[$i]."'";
> }else {
>  $query = "UPDATE CMS_FIELDS SET cms_fields_is_editable = '0'
>WHERE cms_table_name = '$_GET[table_name]' AND
> cms_field_name
> = '".$fields[$i]."'";
> }
> echo "$query";
> $i++;
>}
>   }
> 
> How can i get the script to look at all of the values sent from the
form
> (ticked or unticked)?
> 
> thanks for your help
> 
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Arrays

2003-03-16 Thread John W. Holmes
> $var = array (
> 'AN' => array (
>   'Description' => 'Accession Number: (AN)',
>   'ReferenceURL' => 'AN__Accession_Number.jsp',
>   ),
>  'AU' => array (
>   'Description' => 'Author(s): (AU)',
>   'ReferenceURL' => 'AU__Author(s).jsp',
>   )
> )
> 
> What I want to get is the keys 'AN' and 'AU' as values.
> 
> while (??){
> echo "This key is $var[??]";
> }
> 
> This key is AN
> This key is AU

foreach($var as $key => $value)
{ echo "The key is $key"; }

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Help - Automation of web pages when Register-Globals=Off

2003-03-16 Thread Petras Virzintas
Hi, I would like to automate some PHP web pages from a Windows application. The 
relevant Microsoft document reveals that the WebControl's Navigate method should be 
able to do this by supplying the URL, Post data and Header.

Question: As anyone accomplished this? If so, could they provide an example.

Thanks in advance
Petras ([EMAIL PROTECTED] - remove no spam before replying)



[PHP] Multiple DB Inits

2003-03-16 Thread Ron Rudman
I am using MySQL via PEAR:DB like this (these statements are executed for
each SQL statement)::

 $dbc = DB::connect( $dsn );
 $cmd = strtoupper(strtok( $str, " " ));
  if ( $cmd == "SELECT" || $cmd == "SHOW" )
  $aRows = ( $queryparms == "" ) ? $dbc->getAll( $str ) : $dbc->getAll(
$str, $queryparms );
 else
  if ( $queryparms == "" )
   $dbc->query( $str );
  else
   $dbc->query( $str, $queryparms );

Everything works just fine.  However, if I do, e.g., 4 UPDATES in a row, the
above statements are executed 4 times and my MySQL log looks like this:

030316 16:30:002812 Connect [EMAIL PROTECTED] on
   2812 Init DB VSG_TLI
   2812 Init DB VSG_TLI
   2812 Query   UPDATE vsg SET
VSGSegmentNumber=0,VSGSlideNumber=0,VSGSlideFileName='',VSGQNumber=0 WHERE
VSGCode="VT1"
   2812 Init DB VSG_TLI
   2812 Init DB VSG_TLI
   2812 Query   UPDATE user SET UserIsJoined=0,
UserIsDone=0, UserCurrentSG=UserAssignedSG WHERE UserVSGID = 14
   2812 Init DB VSG_TLI
   2812 Init DB VSG_TLI
   2812 Query   UPDATE qcontrol SET
QCPreviousHigh=QCHigh, QCHigh=0 WHERE QCVSGID = 14
   2812 Init DB VSG_TLI
   2812 Init DB VSG_TLI
   2812 Query   UPDATE sgstatus SET SGCurrentUser=''
WHERE SGVSGCode='VT1'
   2812 Quit

Aren't those double Init DBs an indication of a problem?. I am not using
persistent connections because I'm not clear on what they do.  All of my
users would be using the same DSN, so it seems to me that they'd all be
using the same connection, which doesn't seem like a hot idea.  For that
matter, all the log lines say 2812, so does that mean these in fact all used
the same connection?



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Force refresh of graphic - how?

2003-03-16 Thread Justin French
Ok, thanks for the tip :)

Justin


on 13/03/03 7:53 PM, Ernest E Vogelsinger ([EMAIL PROTECTED]) wrote:

> At 23:33 12.03.2003, Justin French said:
> [snip]
>> Put this code in your shared library of functions (adapted from manual,
>> untested):
>> > function randNumber($min=1000,$max=9)
>> {
>> // build a seed
>> list($usec, $sec) = explode(' ', microtime());
>> $seed = (float) $sec + ((float) $usec * 10);
>> 
>> // seed random generator
>> srand($seed);
>> 
>> // return random number
>> return rand($min,$max);
>> }
>> ?>
> [snip]
> 
> May I?
> 
> It's usually not a good idea to re-seed the randum number generator during
> a single script instance, as this might use the same seed more than once,
> resulting in the identical random sequence...
> 
> To avoid reseeding, you could e.g. use a static variable in your
> randNumber() function:
> 
> function randNumber($min=1000,$max=9)
> {
> static $is_seeded = false;
> if (!$is_seeded) {
> $is_seeded = true;
> // build a seed
> list($usec, $sec) = explode(' ', microtime());
> $seed = (float) $sec + ((float) $usec * 10);
> // seed random generator
> srand($seed);
> }
> ...
> 
> I prefer to add a string generated by uniqid(), such as
> 
> 
> uniqid() uses the entropy generated by the opsys random device (if
> available) in an attempt to make this truly random.
> 
> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



php-general Digest 16 Mar 2003 22:03:33 -0000 Issue 1942

2003-03-16 Thread php-general-digest-help

php-general Digest 16 Mar 2003 22:03:33 - Issue 1942

Topics (messages 139834 through 139872):

FOPEN and EREG not working
139834 by: Monil Chheda

passing values from one script to another script
139835 by: Chinmoy Barua
139837 by: Alan McFarlane
139843 by: Marek Kilimajer

Re: Include() in included file
139836 by: Veniamin Goldin

Re: Re Sessionid
139838 by: Peter Goggin
139839 by: Ernest E Vogelsinger

Re: replace string in array
139840 by: Jan Grafström

permission problem - i guess
139841 by: gamin
139842 by: Marek Kilimajer
139845 by: gamin
139848 by: Marek Kilimajer
139853 by: gamin

Re: Do query strings get spidered by Google?
139844 by: -{ Rene Brehmer }-
139849 by: Robert Cummings

simple arithmetic problem
139846 by: pei_world
139850 by: Marek Kilimajer

Re: group by get last record
139847 by: Don Read

HTTP_REFERER reliability
139851 by: rotsky
139852 by: Dan Hardiker
139854 by: Marek Kilimajer
139863 by: Leif K-Brooks

building a large-scale application using oop
139855 by: raulrod.gmx.de
139857 by: Charles Kline
139859 by: daniel

Scrolling through values sent from a form
139856 by: shaun

mail(); works, but only for mails to my (mail)server
139858 by: Manuel Glauser

Function/globalizing
139860 by: Liam Gibbs
139861 by: Joel Colombo

Arrays
139862 by: John Taylor-Johnston

Re: List tables
139864 by: daniel

OpenBSD 3.2 PHP 4.2.3 packages
139865 by: Bob Eldred

Re: ignore html
139866 by: daniel

writing to file count multiple impression..
139867 by: WebDev

using strcmp()
139868 by: Anthony Ritter
139869 by: LinuxGeek
139870 by: Justin Garrett
139871 by: Leif K-Brooks

multi-d array frustration
139872 by: Michael Geier

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
[EMAIL PROTECTED]


--
--- Begin Message ---
Hi,

I need to get some details from a LOG file as to which
keywords are used...

I have attached the LOG file.

I heed the details of the following:-

1. Ip Address
2. Date
3. The page that was requested
4. KeyWords used by the Search Engine [ Google / Yahoo
seperated ]
(ordered BY DATE) in a tabular FORMAT

I am using the following CODE.. But , it doesnt work




Could any one please help me 

Thanks...

-Monil Chheda
http://services.eliteral.com

=
Best Regards,
Monil Chheda(INDIA)
http://domains.eliteral.com
===
===

__
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com

web.zip
Description: web.zip
--- End Message ---
--- Begin Message ---

Hello everybody,

I want to pass a value, which came from a HTML form, to another PHP script. How can i 
do this?

e.g.: $login - the value of this varriable is came from LOGIN.HTML to LOGIN.PHP. How 
can i pass the value of $login from LOGIN.PHP to PROCESS.PHP?

Thank you,

Chinmoy



-
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online--- End Message ---
--- Begin Message ---
Have a look at the $_POST super global variable documentation.



"Chinmoy Barua" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> Hello everybody,
>
> I want to pass a value, which came from a HTML form, to another PHP
script. How can i do this?
>
> e.g.: $login - the value of this varriable is came from LOGIN.HTML to
LOGIN.PHP. How can i pass the value of $login from LOGIN.PHP to PROCESS.PHP?
>
> Thank you,
>
> Chinmoy
>
>
>
> -
> Do you Yahoo!?
> Yahoo! Web Hosting - establish your business online


--- End Message ---
--- Begin Message ---
Either use session, cookies, or pass the value in URLs. Because it is 
login information, I would choose session or cookie

Chinmoy Barua wrote:

Hello everybody,

I want to pass a value, which came from a HTML form, to another PHP script. How can i do this?

e.g.: $login - the value of this varriable is came from LOGIN.HTML to LOGIN.PHP. How can i pass the value of $login from LOGIN.PHP to PROCESS.PHP?

Thank you,

Chinmoy



-
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
 


--- End Message ---
--- Begin Message ---
Hi Hubert,

Check if there display_errors in your php.ini is set to Yes,
and also take a look at your apache error log when you execute this
page, probably you will see an error there.



Best regards,
Veniamin Goldin
Interlogics, Inc.

Вы писали 15 марта 2003 г., 12:34:35:

HK> Hello all!

HK> In index.php I include a f

[PHP] multi-d array frustration

2003-03-16 Thread Michael Geier
having alot of difficulties wrapping my head around this and looking for 
ideas...

SQL TABLE:
   1...n fields
auto, name, description, version, etc...

auto= unique id
name= possibly non-unique string, but with unique version
description = possibly non-unique string, based on name
version = unique to name

ie.
   1   typeXX brand1
   2   typeXx-brand2
   3   typeYy-brand1
   4   typeZz-brand1
   5   typeZZ brand2

sql = select * from table where [ conditions ] order by auto

problem:
display unique name, and associated rows based on highest version
ie. (see above)
   typeX (version 2):   x-brand
   typeY (version 1):   y-brand
   typeZ (version 2):   Z brand

through a mixture of the original sql query, multisort_array and array_unique, 
I have been able to get the unique names (which I could do with one sql query), 
however, I have not been able to get: 
   select * from table where [conditions] and greatest version for unique name

any help appreciated
===
Michael Geier
CDM Sports, Inc. Systems Administration
   email: [EMAIL PROTECTED]
   phone: 314.692.3540

---
 This email sent using CDM Sports Webmail v3.1
  [ http://webmail.cdmsports.com ]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] using strcmp()

2003-03-16 Thread Leif K-Brooks
You're missing the ; on this line:

$result=strcmp($firstword, $secondword)



Anthony Ritter wrote:

The following test script for the function strcmp() is from page 114 -115 of
PHP (Hungry Minds).
I'm getting a parse error on line 6.

Using PHP 4.1.1 / MS Win 98 / Apache Server.

Many thanks...
Tony Ritter
..
=1)
{
 $statement="comes after";
}
else if ($result<=-1)
{
 $statement="comes before";
}
else
{
 $statement="is the same as";
}
echo "The word $firstword $statement";
?>




 

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: using strcmp()

2003-03-16 Thread Justin Garrett
Anthony Ritter wrote:
The following test script for the function strcmp() is from page 114 -115 of
PHP (Hungry Minds).
I'm getting a parse error on line 6.

Using PHP 4.1.1 / MS Win 98 / Apache Server.

Many thanks...
Tony Ritter
..
=1)
 {
  $statement="comes after";
 }
else if ($result<=-1)
 {
  $statement="comes before";
 }
else
 {
  $statement="is the same as";
 }
echo "The word $firstword $statement";
?>



You were missing a semicolon:

$result=strcmp($firstword, $secondword);

Justin Garrett

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] using strcmp()

2003-03-16 Thread LinuxGeek
You need a semicolon after the strcmp() function

$result=strcmp($firstword, $secondword);

LinuxGeek

Anthony Ritter wrote:

The following test script for the function strcmp() is from page 114 -115 of
PHP (Hungry Minds).
I'm getting a parse error on line 6.

Using PHP 4.1.1 / MS Win 98 / Apache Server.

Many thanks...
Tony Ritter
..
=1)
{
 $statement="comes after";
}
else if ($result<=-1)
{
 $statement="comes before";
}
else
{
 $statement="is the same as";
}
echo "The word $firstword $statement";
?>




 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] using strcmp()

2003-03-16 Thread Anthony Ritter
The following test script for the function strcmp() is from page 114 -115 of
PHP (Hungry Minds).

I'm getting a parse error on line 6.

Using PHP 4.1.1 / MS Win 98 / Apache Server.

Many thanks...
Tony Ritter
..

=1)
 {
  $statement="comes after";
 }
else if ($result<=-1)
 {
  $statement="comes before";
 }
else
 {
  $statement="is the same as";
 }
echo "The word $firstword $statement";
?>





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] writing to file count multiple impression..

2003-03-16 Thread WebDev
Hello all

A frind of mine likes to count the impressions on each of his photgraphy online
and as well he likes to display this number under each image

he dosn't wish to use for each image a new request to the different count script 
..all should be counted with one script and saved in one datafile 

//   Code start 

//  Image ID
$ImageNr=$HTTP_GET_VARS['n'];
if(!$ImageNr){$ImageNr=0;}

// Full sys path to count.txt 
$counter_file = "count2.txt"; 
 
// Puts the file lines into $counter_file_line array 
$counter_file_line = file($counter_file); 
 
// adds one to the number in the [0] array or the very first line 
$counter_file_line[0]++; 
 
//  I use a+ well I need each line representing an induvitual image ? ??
// opends the file and then writes the new number and then closes it 
$cf = fopen($counter_file, "a+"); 
fputs($cf, "$counter_file_line[0]");   
fclose($cf); 
 
// prints out the full count 

// ??
echo " Views $counter_file_line[0] "; 

//  Code end


[PHP] RE: ignore html

2003-03-16 Thread daniel
hi guys trikky question , i would like to ignore html in content that i am 
replacing news lines with page breaks , how is it possible ? at the moment and 
new line like so \r\n in content will be replaced with a  but happens to 
work on say tables tags within the content aswell and need to ignore this.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] OpenBSD 3.2 PHP 4.2.3 packages

2003-03-16 Thread Bob Eldred
I'm hopeful that someone here has been in my situation and found a fix for
it.

I recently installed a clean OpenBSD 3.2 system, and added the
php4-core-4.2.3 and php4-gd-4.2.3 packages, along with a few other packages
from the php4 collection.  Most everything seems to be working fine.
However, php4-gd-4.2.3 doesn't appear to be working at all.  At least the
createimagefromjpeg function isn't returning the picture it's supposed to
return.  It's similar to what I had before the upgrade to 3.2 when I didn't
have PHP compiled with the --with-gd and --with-jpeg-dir config options.

A phpinfo() page shows that the gd module is activated, and that JPG Support
is enabled, but the function does not work at all.

Any ideas where I can look to solve this?

Bob


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] List tables

2003-03-16 Thread daniel
use mysql_list_tables ?
>= Original Message From "shaun" <[EMAIL PROTECTED]> =
>Hi,
>
>i would like to list all of the tables and field names in my database
>
>e.g.
>
>table 1
>  field 1
>  field 2
>  field 3
>table 2
>  field 1
>  field 2
>  field 3
>table 3
>  field 1
>  field 2
>  field 3
>etc
>
>is there a simple way to do this?
>
>thanks for your help
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] HTTP_REFERER reliability

2003-03-16 Thread Leif K-Brooks
Anyone can send any referer (sic) header to your script.  It shouldn't 
be used for checking if someone is trying to hack the script, but it 
should be find in your case.

rotsky wrote:

I've experimented using $_SERVER['HTTP_REFERER'] which seems to work here.
If the user enters valid login details, the session vars are set and they
are bounced automatically back to the original page - which is fab. But the
manual says that HTTP_REFERER is unreliable, so I'm intrigued to know
exactly what the problems are. Any ideas?


 

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Arrays

2003-03-16 Thread John Taylor-Johnston
I thought I understood this example: http://www.php.net/manual/en/ref.array.php

 array(
'first' => 'Caleb',
'last' => 'Maclennan'
)
);
echo "My first name is {$var['name']['first']}!";
?>

I can do that. But, my array looks more like:

$var = array (
'AN' => array (
  'Description' => 'Accession Number: (AN)',
  'ReferenceURL' => 'AN__Accession_Number.jsp',
  ),
 'AU' => array (
  'Description' => 'Author(s): (AU)',
  'ReferenceURL' => 'AU__Author(s).jsp',
  )
)

What I want to get is the keys 'AN' and 'AU' as values.

while (??){
echo "This key is $var[??]";
}

This key is AN
This key is AU

How :) ?

Still learning :)
John



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Function/globalizing

2003-03-16 Thread Joel Colombo
Try:

somewhere global define :
   $encryptiontechnique = 'ENCRYPT ALGORITHM';


function encryptPassword($password, $salt='') {
global $encryptiontechnique; if ($salt === '') { $salt =
$encryptiontechnique; }
// CODE..

}

Joel Colombo





"Liam Gibbs" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
I have a function, such as this:

function encryptPassword($password, $salt = $encryptiontechnique) {
}

$encryptiontechnique is defined, obviously outside the function. How is it
possible to make $encryptiontechnique global so that this will work?



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Function/globalizing

2003-03-16 Thread Liam Gibbs
I have a function, such as this:

function encryptPassword($password, $salt = $encryptiontechnique) {
}

$encryptiontechnique is defined, obviously outside the function. How is it possible to 
make $encryptiontechnique global so that this will work?


RE: [PHP] building a large-scale application using oop

2003-03-16 Thread daniel
have a look at my class , i had to do it from scratch as pear db + mdb have
too much weight and needed a faster app, being that its going to be on a mysql
database only, i send my login variables to a connect function, and those
login variables i store in a file outside the web directory

http://electroteque.dyndns.org:1023/benchmark/DB.phps

and in connect, the file with the login info is a directory up from htdocs
>= Original Message From Charles Kline <[EMAIL PROTECTED]> =
>Not sure how to answer your question as I am real new to PHP, but you
>may want to look at PEAR if you have not done so. I know there are
>libraries that folks have been talking about recently that handle just
>these sorts of things. If you don't use them - you may find your
>answers by looking at the sources.
>
>- Charles
>
>On Sunday, March 16, 2003, at 12:57 PM, [EMAIL PROTECTED] wrote:
>
>> Hi,
>>
>> I am currently working on transforming a rather large software package
>> to
>> oop. I do have a few years of experience with php, but just started to
>> use oop.
>> One of the first question that arose was how to handle configuration
>> vars.
>> These should ideally be stored in a file:
>>
>> >
>> $db_user = "user";
>> $db_password ="secret";
>>
>> etc.
>>
>> ?>
>>
>> Now, I have to access these vars from a class.
>>
>> class database {
>>
>> var $db_user;
>> var $db_password;
>>
>> function connect()
>>  {
>>
>> }
>>
>> }
>>
>> What is the best way to access these variables? I want to avoid global
>> vars.
>> I also don't like to set the vars using $object->db_user = $db_user;
>> every
>> time I use it.
>>
>> Also, is there any large open-source php - application which could
>> serve as
>> an example of best practice?
>>
>> best regards,
>>
>> Raul
>>
>> --
>> +++ GMX - Mail, Messaging & more  http://www.gmx.net +++
>> Bitte lächeln! Fotogalerie online mit GMX ohne eigene Homepage!
>>
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] mail(); works, but only for mails to my (mail)server

2003-03-16 Thread Manuel Glauser
Hey you guys!

First, I have to say, that php.net gave me a lot of support in the last few weeks and 
months. It's been great to suck information from your guys' website! Thanx a lot!

This weekend, I've been fighting with some really weird problem though... I installed 
a few mail(); actions on my website plus in some projects I'm working on. I have one 
really big problem though... Everything works fine until I want to send a mail to 
another mailserver than mine. So, it only works for my own (mail)server - how the hell 
is that possible? And: can I fix that? Do I have to include special headers?

Thank you very much for yar answer!

Greetz

Manuel, Berne, Switzerland

Re: [PHP] building a large-scale application using oop

2003-03-16 Thread Charles Kline
Not sure how to answer your question as I am real new to PHP, but you 
may want to look at PEAR if you have not done so. I know there are 
libraries that folks have been talking about recently that handle just 
these sorts of things. If you don't use them - you may find your 
answers by looking at the sources.

- Charles

On Sunday, March 16, 2003, at 12:57 PM, [EMAIL PROTECTED] wrote:

Hi,

I am currently working on transforming a rather large software package 
to
oop. I do have a few years of experience with php, but just started to 
use oop.
One of the first question that arose was how to handle configuration 
vars.
These should ideally be stored in a file:



$db_user = "user";
$db_password ="secret";
etc.

?>

Now, I have to access these vars from a class.

class database {

var $db_user;
var $db_password;
function connect()
 {
}

}

What is the best way to access these variables? I want to avoid global 
vars.
I also don't like to set the vars using $object->db_user = $db_user; 
every
time I use it.

Also, is there any large open-source php - application which could 
serve as
an example of best practice?

best regards,

Raul

--
+++ GMX - Mail, Messaging & more  http://www.gmx.net +++
Bitte lächeln! Fotogalerie online mit GMX ohne eigene Homepage!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Scrolling through values sent from a form

2003-03-16 Thread shaun
Hi,

i have a form on a page which is built dynamically and consists of fields in
a certain table and checkboxes. The puropse of the form is to update the the
status of a table called CMS_FIELDS which stores data of all the fields for
all the tables in the database.

Using the following code i am attempting to update the table depending on
whether the boxes have been ticked or not, but the script only outputs
values of the boxes that have been ticked. (the data isn't being updated yet
i am just printing it to the screen for testing purposes).

  if(isset($update_fields)==true){
   $fields='';
   $values='';
   foreach ($_POST as $key => $val) {
 $fields[] = $key;
 $values[] = $val;
   }
   $i=0;
   foreach ($fields as $val){
if ($values[$i] == "on"){
 $query = "UPDATE CMS_FIELDS SET cms_fields_is_editable = '1'
   WHERE cms_table_name = '$_GET[table_name]' AND cms_field_name
= '".$fields[$i]."'";
}else {
 $query = "UPDATE CMS_FIELDS SET cms_fields_is_editable = '0'
   WHERE cms_table_name = '$_GET[table_name]' AND cms_field_name
= '".$fields[$i]."'";
}
echo "$query";
$i++;
   }
  }

How can i get the script to look at all of the values sent from the form
(ticked or unticked)?

thanks for your help



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] building a large-scale application using oop

2003-03-16 Thread raulrod
Hi,

I am currently working on transforming a rather large software package to
oop. I do have a few years of experience with php, but just started to use oop.
One of the first question that arose was how to handle configuration vars.
These should ideally be stored in a file:



Now, I have to access these vars from a class.

class database {

var $db_user;
var $db_password;

function connect()
 {

}

}

What is the best way to access these variables? I want to avoid global vars.
I also don't like to set the vars using $object->db_user = $db_user; every
time I use it.

Also, is there any large open-source php - application which could serve as
an example of best practice?

best regards,

Raul

-- 
+++ GMX - Mail, Messaging & more  http://www.gmx.net +++
Bitte lächeln! Fotogalerie online mit GMX ohne eigene Homepage!


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] HTTP_REFERER reliability

2003-03-16 Thread Marek Kilimajer
As you are already using sessions, you can store the original page in a 
session variable

rotsky wrote:

I have a small login form on the home page of my site. At the moment, when
people enter their user details and hit 'send', they go to another page
which check their details and, if they are successful, prints a welcome
message. The problem is, they are now on this page and have to work their
way back to the home page. I can provide a link for this, of course, but
that limits the number of pages that can have such a login panel, because I
have to hand-code the return link.
I've experimented using $_SERVER['HTTP_REFERER'] which seems to work here.
If the user enters valid login details, the session vars are set and they
are bounced automatically back to the original page - which is fab. But the
manual says that HTTP_REFERER is unreliable, so I'm intrigued to know
exactly what the problems are. Any ideas?


 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] permission problem - i guess

2003-03-16 Thread gamin

> Weird, check if both versions use the same php.ini, it is mentioned in
> phpinfo output.
>

Yes, they both point to /etc/php.ini

Do you want me to paste the contents of the 2 files here ? they are a little
long so i'm asking

gamin



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] HTTP_REFERER reliability

2003-03-16 Thread Dan Hardiker

> But the manual says that HTTP_REFERER is unreliable, so I'm
> intrigued to know exactly what the problems are. Any ideas?

The HTTP_REFERER field is retrieved from the "HTTP Referer:" header as
used in the HTTP protocol. This field is set entirely by the client
browser / application retrieving the data. There is nothing to stop the
client from adding malformed, incorrect or spoof data into this field -
and thus possibly faking entry to the data you are protecting.

You cannot rely on this field to be accurate, correct or even populated.


-- 
Dan Hardiker [EMAIL PROTECTED]
ADAM Software & Systems Engineer
First Creative


-- 
Dan Hardiker [EMAIL PROTECTED]
ADAM Software & Systems Engineer
First Creative



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] HTTP_REFERER reliability

2003-03-16 Thread rotsky
I have a small login form on the home page of my site. At the moment, when
people enter their user details and hit 'send', they go to another page
which check their details and, if they are successful, prints a welcome
message. The problem is, they are now on this page and have to work their
way back to the home page. I can provide a link for this, of course, but
that limits the number of pages that can have such a login panel, because I
have to hand-code the return link.

I've experimented using $_SERVER['HTTP_REFERER'] which seems to work here.
If the user enters valid login details, the session vars are set and they
are bounced automatically back to the original page - which is fab. But the
manual says that HTTP_REFERER is unreliable, so I'm intrigued to know
exactly what the problems are. Any ideas?



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] simple arithmetic problem

2003-03-16 Thread Marek Kilimajer
fgets moves the position in the file pointer, you need

   echo (time()).">>";
   $old=fgets($fp);
   echo $old." = ";
   $new=time();
   
   echo ">>>".($new - $old)."<<<";



pei_world wrote:

I have a problem in time substraction.
the number print out correct, but don't know
why i cann't do the substraction between them
===
   echo (time()).">>";
   echo (fgets($fp))." = ";
   $new=time();
   $old=fgets($fp);
   echo ">>>".($new - $old)."<<<";
ouput ==

1047832384>>
1047832349 =
 

1047832384<<<
   



--
Sincerely your;
pei_world ( .::IT::. )





 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Do query strings get spidered by Google?

2003-03-16 Thread Robert Cummings
I don't think Google follows URLS to every variation based on a query string.
I know to have some of my pages indexed I had to rewrite the URL so the query
string looked like a directory path.

Cheers,
Rob.

-{ Rene Brehmer }- wrote:
> 
> Judging from how Google has indexed my site, it simply follows all links
> it encounters on the site, since I atleast can find several of my pages
> that are a bunch of links deep inside the site...
> 
> Rene
> 
> On Sat, 15 Mar 2003 10:26:05 -0700, Mike Hillyer wrote about "[PHP] Do
> query strings get spidered by Google?" what the universal translator
> turned into this:
> 
> >I am trying to decide how to lay out a site with a lot of articles, and I am
> >wondering if query strings get spidered by Google. I was thinking it would
> >make for an easy search engine if I could put the articles in fulltext
> >searchable MySQL columns, but I do not want to lose the ability of search
> >engines to spider them. Otherwise, I believe there is a way to convert the
> >quert string to a trailing / so it looks like directory structure, does
> >anyone have info on that?
> 
> --
> Rene Brehmer
> 
> This message was written on 100% recycled spam.
> 
> Come see! My brand new site is now online!
> http://www.metalbunny.net
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

-- 
.-.
| Worlds of Carnage - http://www.wocmud.org   |
:-:
| Come visit a world of myth and legend where |
| fantastical creatures come to life and the  |
| stuff of nightmares grasp for your soul.|
`-'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] permission problem - i guess

2003-03-16 Thread Marek Kilimajer
Weird, check if both versions use the same php.ini, it is mentioned in 
phpinfo output.

gamin wrote:

Hi Marek,

 

Try executing phpinfo from u.php, run it once from the command line and
once from the browser and check if they are nay different.
   

I added the function phpinfo() to u.php and ran u.php from the commandline
and then backticked `` it in test.php and called test.php from the browser.
The configure commands (commandline u.php and browser test.php) for both are
identical. but the result in the browser (test.php that executes u.php
internally) there is no mention of the section on 'mysql'. The following
section is non existant in the browser. Im stumped !!
<--- this is from phpinfo() [u.php] executed from command line >
mysql
MySQL Support => enabled
Active Persistent Links => 0
Active Links => 0
Client API version => 3.23.49
MYSQL_MODULE_TYPE => builtin
MYSQL_SOCKET => /var/lib/mysql/mysql.sock
MYSQL_INCLUDE =>  MYSQL_LIBS =>
Directive => Local Value => Master Value
mysql.allow_persistent => On => On
mysql.connect_timeout => -1 => -1
mysql.default_host => no value => no value
mysql.default_password => no value => no value
mysql.default_port => no value => no value
mysql.default_socket => no value => no value
mysql.default_user => no value => no value
mysql.max_links => Unlimited => Unlimited
mysql.max_persistent => Unlimited => Unlimited
mysql.trace_mode => Off => Off
Thank you and regards

gamin.



 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] group by get last record

2003-03-16 Thread Don Read

On 16-Mar-2003 Daniel Harik wrote:
> Hello,
> 
> Guys i try to join to tables
> 
> slides:
> id
> userid
> file
> moment
> 
> users
> id
> username
> 
> As there few slids per user and i want to get only last one, i use
> following 
> sql query, but it fetches me first slide. How can i make it fetch last
> one 
> please?
> 
>  SELECT slides.file, slides.moment, users.id, users.username FROM slides,
> users where users.id=slides.userid GROUP BY users.id desc 
> 

Which record is 'last' ?
There is no order to the records without an 'ORDER BY' clause.

If you figure that out, you can use a temporary table with all the
desired fields and with the userid as primary key. 
Then do  'REPLACE INTO temptbl SELECT ... ORDER BY whatever'.
And finally do a 'SELECT * FROM temptbl'

Regards,
-- 
Don Read   [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to 
   steal the neighbor's newspaper, that's the time to do it.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] simple arithmetic problem

2003-03-16 Thread pei_world
 I have a problem in time substraction.
the number print out correct, but don't know
why i cann't do the substraction between them
===
echo (time()).">>";
echo (fgets($fp))." = ";
$new=time();
$old=fgets($fp);
echo ">>>".($new - $old)."<<<";

ouput ==

1047832384>>
1047832349 =
>>>1047832384<<<


--
Sincerely your;

pei_world ( .::IT::. )






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] permission problem - i guess

2003-03-16 Thread gamin
Hi Marek,

> Try executing phpinfo from u.php, run it once from the command line and
> once from the browser and check if they are nay different.
>

I added the function phpinfo() to u.php and ran u.php from the commandline
and then backticked `` it in test.php and called test.php from the browser.

The configure commands (commandline u.php and browser test.php) for both are
identical. but the result in the browser (test.php that executes u.php
internally) there is no mention of the section on 'mysql'. The following
section is non existant in the browser. Im stumped !!


<--- this is from phpinfo() [u.php] executed from command line >
mysql

MySQL Support => enabled
Active Persistent Links => 0
Active Links => 0
Client API version => 3.23.49
MYSQL_MODULE_TYPE => builtin
MYSQL_SOCKET => /var/lib/mysql/mysql.sock
MYSQL_INCLUDE =>  MYSQL_LIBS =>
Directive => Local Value => Master Value
mysql.allow_persistent => On => On
mysql.connect_timeout => -1 => -1
mysql.default_host => no value => no value
mysql.default_password => no value => no value
mysql.default_port => no value => no value
mysql.default_socket => no value => no value
mysql.default_user => no value => no value
mysql.max_links => Unlimited => Unlimited
mysql.max_persistent => Unlimited => Unlimited
mysql.trace_mode => Off => Off

Thank you and regards

gamin.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Do query strings get spidered by Google?

2003-03-16 Thread -{ Rene Brehmer }-
Judging from how Google has indexed my site, it simply follows all links
it encounters on the site, since I atleast can find several of my pages
that are a bunch of links deep inside the site...

Rene

On Sat, 15 Mar 2003 10:26:05 -0700, Mike Hillyer wrote about "[PHP] Do
query strings get spidered by Google?" what the universal translator
turned into this:

>I am trying to decide how to lay out a site with a lot of articles, and I am
>wondering if query strings get spidered by Google. I was thinking it would
>make for an easy search engine if I could put the articles in fulltext
>searchable MySQL columns, but I do not want to lose the ability of search
>engines to spider them. Otherwise, I believe there is a way to convert the
>quert string to a trailing / so it looks like directory structure, does
>anyone have info on that?

-- 
Rene Brehmer

This message was written on 100% recycled spam.

Come see! My brand new site is now online!
http://www.metalbunny.net

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] passing values from one script to another script

2003-03-16 Thread Marek Kilimajer
Either use session, cookies, or pass the value in URLs. Because it is 
login information, I would choose session or cookie

Chinmoy Barua wrote:

Hello everybody,

I want to pass a value, which came from a HTML form, to another PHP script. How can i do this?

e.g.: $login - the value of this varriable is came from LOGIN.HTML to LOGIN.PHP. How can i pass the value of $login from LOGIN.PHP to PROCESS.PHP?

Thank you,

Chinmoy



-
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] permission problem - i guess

2003-03-16 Thread Marek Kilimajer
Try executing phpinfo from u.php, run it once from the command line and 
once from the browser and check if they are nay different.

gamin wrote:

Hi,

   I have PHP 4.3.0 installed on a Red Hat system. I have written a number
of command line scripts which run perfectly fine. For example

#! /usr/bin/php -q

// do my stuff
?>

This script works perfectly fine, when started from the command line. Now i
intend to call this command line script from another another script (that is
called from the browser). for example -
< /var/www/html/test.php >


This generates an error ' Fatal error : Call to undefined function:
mysql_connect() in /usr/local/bin/u.php on line 3'
phpinfo gives me the following cofigure command

'./configure' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin'
'--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share'
'--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec'
'--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man'
'--infodir=/usr/share/info' '--prefix=/usr' '--with-config-file-path=/etc'
'--disable-debug' '--with-pic' '--disable-rpath'
'--enable-inline-optimization' '--with-bz2' '--with-exec-dir=/usr/bin'
'--with-freetype-dir=/usr' '--with-gd' '--with-gdbm' '--with-gettext'
'--with-jpeg-dir=/usr' '--with-mm' '--with-openssl' '--with-png'
'--with-regex=system' '--with-ttf' '--with-xml' '--with-expat-dir=/usr'
'--with-zlib' '--with-layout=GNU' '--enable-bcmath' '--enable-debugger'
'--enable-ftp' '--enable-magic-quotes' '--enable-safe-mode'
'--enable-sockets' '--enable-sysvsem' '--enable-sysvshm'
'--enable-track-vars' '--enable-yp' '--enable-wddx' '--with-ldap=shared'
'--with-mysql=shared' '--with-apxs=/usr/sbin/apxs'
Thank you to all

With regrads

gamin





 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] permission problem - i guess

2003-03-16 Thread gamin
Hi,

I have PHP 4.3.0 installed on a Red Hat system. I have written a number
of command line scripts which run perfectly fine. For example


#! /usr/bin/php -q



This script works perfectly fine, when started from the command line. Now i
intend to call this command line script from another another script (that is
called from the browser). for example -

< /var/www/html/test.php >



This generates an error ' Fatal error : Call to undefined function:
mysql_connect() in /usr/local/bin/u.php on line 3'

phpinfo gives me the following cofigure command

'./configure' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin'
'--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share'
'--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec'
'--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man'
'--infodir=/usr/share/info' '--prefix=/usr' '--with-config-file-path=/etc'
'--disable-debug' '--with-pic' '--disable-rpath'
'--enable-inline-optimization' '--with-bz2' '--with-exec-dir=/usr/bin'
'--with-freetype-dir=/usr' '--with-gd' '--with-gdbm' '--with-gettext'
'--with-jpeg-dir=/usr' '--with-mm' '--with-openssl' '--with-png'
'--with-regex=system' '--with-ttf' '--with-xml' '--with-expat-dir=/usr'
'--with-zlib' '--with-layout=GNU' '--enable-bcmath' '--enable-debugger'
'--enable-ftp' '--enable-magic-quotes' '--enable-safe-mode'
'--enable-sockets' '--enable-sysvsem' '--enable-sysvshm'
'--enable-track-vars' '--enable-yp' '--enable-wddx' '--with-ldap=shared'
'--with-mysql=shared' '--with-apxs=/usr/sbin/apxs'

Thank you to all

With regrads

gamin






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: replace string in array

2003-03-16 Thread Jan Grafström

Chris,

you can splice an array
http://www.php.net/manual/sv/function.array-splice.php

Jan Grafstrom



"Chris Winters" <[EMAIL PROTECTED]> skrev i meddelandet
news:[EMAIL PROTECTED]
> I'm having a bit of trouble...
>
> I have an array that consists of a string like this:
>
> string1\rstring2\rstring3\rstring4
>
> I want to REMOVE STRING3, and keep the rest of the array intact - but
cannot
> figure on how to do it. I tried using functions such as preg_replace,
strstr
> and so forth...
>
> In my code this is how I go thru the array...
>
> //snippet...
>
> //search for carriage return, split it...
>  $line = preg_split( "/[\r]+/" ,$line);
>  reset($line);
>
> //Line will consists of array...
> while (list ($key, $val) = each ($line))
>  {
>echo "$key => $val";
>
>if(strstr($val,$newmail))
> {
>   echo "Found! and trying to delete";
>  //What to do form this point, I have the slightest foggy...
> }
> }
>
> It finds it without ANY problems, but I cannot seem to "go" to the
position
> of found string, delete it, then keep the rest of the array.
> I did manage to find this on php.net, but it doesnt seem to work:
> function stri_replace2 ($search,$replace,$text)
> {
>if (!is_array($search))
> {
>   $search = array($search);
>   $replace = array($replace);
> }
>  foreach($search AS $key => $val)
>   {
> $search["$key"]  = '/'.quotemeta($val).'/i';
>   }
> echo "$search $replace $text";
>
>return preg_replace($search,$replace,$text);
> }
>
> Could anyone help me with this?
>
> Thanks in advanced!
>
> Chris
>
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re Sessionid

2003-03-16 Thread Ernest E Vogelsinger
At 14:20 16.03.2003, Peter Goggin said:
[snip]
>Is the value returned by session_id (), called after session_star() always a
>unique string?
>The results of several trials gave me:
>6f88d2d3fd7d0d47aea1e45087368adc
>3cc2c1b299fcaa6f4fd107683d78a00c
>115e8da118af1c5d88d6db1c1481077a
>26dda220f9d64de593ce2f2de6b4bb6e
>26dda220f9d64de593ce2f2de6b4bb6e
>
>i.e. every time i started a new session I got a unique string, while the
>string remained the sme within the same session.
[snip] 

That's exactly how it should be. The session ID is the unique key to the
session private data, and is passed between client and server either via
cookie, or via request parameter, whatever is necessary (PHP can determine
this automatically).

The key is supposed to be unique on a single server. It is derived by
calculating a random value, starting with the current systems sec/usec, and
a random number. If an external entropy source is available the resulting
ID is further randomized using this entropy. Finally it is converted to a
hex string. (If you're interested in the actual code to accomplish this,
you may find it in {php_source_directory}/ext/session.c, _php_create_id(),
and {php_source_directory}/ext/standard/lcg.c, php_combined_lcg()).


-- 
   >O Ernest E. Vogelsinger
   (\)ICQ #13394035
^ http://www.vogelsinger.at/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re Sessionid

2003-03-16 Thread Peter Goggin
Is the value returned by session_id (), called after session_star() always a
unique string?
The results of several trials gave me:
6f88d2d3fd7d0d47aea1e45087368adc
3cc2c1b299fcaa6f4fd107683d78a00c
115e8da118af1c5d88d6db1c1481077a
26dda220f9d64de593ce2f2de6b4bb6e
26dda220f9d64de593ce2f2de6b4bb6e

i.e. every time i started a new session I got a unique string, while the
string remained the sme within the same session.

How is this string derived?

Regards

Peter Goggin


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: passing values from one script to another script

2003-03-16 Thread Alan McFarlane
Have a look at the $_POST super global variable documentation.



"Chinmoy Barua" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> Hello everybody,
>
> I want to pass a value, which came from a HTML form, to another PHP
script. How can i do this?
>
> e.g.: $login - the value of this varriable is came from LOGIN.HTML to
LOGIN.PHP. How can i pass the value of $login from LOGIN.PHP to PROCESS.PHP?
>
> Thank you,
>
> Chinmoy
>
>
>
> -
> Do you Yahoo!?
> Yahoo! Web Hosting - establish your business online



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Include() in included file

2003-03-16 Thread Veniamin Goldin
Hi Hubert,

Check if there display_errors in your php.ini is set to Yes,
and also take a look at your apache error log when you execute this
page, probably you will see an error there.



Best regards,
Veniamin Goldin
Interlogics, Inc.

Вы писали 15 марта 2003 г., 12:34:35:

HK> Hello all!

HK> In index.php I include a file template.php using

HK>  // this is index.php file
HK> include('template.php');
?>>

HK> Works fine. In template.php I'm using include function too

HK>  // this is template.php file
HK> echo 'before include';
HK> include('header.php');
HK> echo 'after include';
?>>

HK> Works fine on all machines I installed it till now: Windows (NT, 98), Linux
HK> (some of them). But I installed it on FreeBSD and... surprise. When I call
HK> index.php, all I get is "before include". No header.php content, no "after
HK> include" phrase. And there is no warning or error message. Has anybody got
HK> an idea what is wrong? Cheers,

HK> Hubi






-- 
С уважением,
 Veniamin 
 [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] passing values from one script to another script

2003-03-16 Thread Chinmoy Barua

Hello everybody,

I want to pass a value, which came from a HTML form, to another PHP script. How can i 
do this?

e.g.: $login - the value of this varriable is came from LOGIN.HTML to LOGIN.PHP. How 
can i pass the value of $login from LOGIN.PHP to PROCESS.PHP?

Thank you,

Chinmoy



-
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online

[PHP] FOPEN and EREG not working

2003-03-16 Thread Monil Chheda
Hi,

I need to get some details from a LOG file as to which
keywords are used...

I have attached the LOG file.

I heed the details of the following:-

1. Ip Address
2. Date
3. The page that was requested
4. KeyWords used by the Search Engine [ Google / Yahoo
seperated ]
(ordered BY DATE) in a tabular FORMAT

I am using the following CODE.. But , it doesnt work




Could any one please help me 

Thanks...

-Monil Chheda
http://services.eliteral.com

=
Best Regards,
Monil Chheda(INDIA)
http://domains.eliteral.com
===
===

__
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com

web.zip
Description: web.zip
-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

php-general Digest 16 Mar 2003 09:53:48 -0000 Issue 1941

2003-03-16 Thread php-general-digest-help

php-general Digest 16 Mar 2003 09:53:48 - Issue 1941

Topics (messages 139811 through 139833):

Re: How to convert an array to variables?
139811 by: Charles Kline
139820 by: Tom Rogers

Re: SMTP Authenticate
139812 by: The Head Sage

Re: Do query strings get spidered by Google?
139813 by: The Head Sage

Encoding /'s
139814 by: Doug Coning
139816 by: John W. Holmes

Re: List tables
139815 by: Miles Thompson

checking array
139817 by: joe

PHP newbie ... function with several returns ?
139818 by: Robert Dyke
139819 by: Jome
139821 by: Robert Dyke
139822 by: Tom Rogers

Confused a little with = to and grater than ...
139823 by: Philip J. Newman
139829 by: Dennis Cole

File upload Stuff ... well kinda.
139824 by: Philip J. Newman
139827 by: Charles Kline

Re: Performance and Function Calls
139825 by: Don Read
139826 by: Jason Sheets

group by get last record
139828 by: Daniel Harik

create keywords meta tag dynamically
139830 by: Veniamin Goldin

Re: Header order
139831 by: John Taylor-Johnston
139832 by: John Taylor-Johnston

Include() in included file
139833 by: Hubert Kowalski

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
[EMAIL PROTECTED]


--
--- Begin Message ---
Tom,

This seems like what I need exactly, but I am having a bit of trouble 
getting it to work.

Here is how I have worked around this, but I know there is a 'real' way 
to do this. Any thoughts? I had to set the variables, or should I just 
use the variables as ${dra_0} etc.?

// get the values for the default dra from array
while(list($key,$val) = each($r_p_dras)){
$n = "dra_$key";
echo $n;
$$n = $val['dra_id'];
}
$dra_a = "${dra_0}";
$dra_b = "${dra_1}";
$dra_c = "${dra_2}";
$dra_d = "${dra_3}";
$dra_e = "${dra_4}";
On Saturday, March 15, 2003, at 02:08 PM, Tom Rogers wrote:

Hi,

Sunday, March 16, 2003, 4:52:10 AM, you wrote:
CK> Hi all,
CK> I have an array that gives me this when I do:

CK> print_r($my_array);

CK> Array
CK> (
CK>  [0] => Array
CK>  (
CK>  [dra_id] => 5
CK>  )
CK>  [1] => Array
CK>  (
CK>  [dra_id] => 8
CK>  )
CK>  [2] => Array
CK>  (
CK>  [dra_id] => 9
CK>  )
CK> )

CK> using a foreach() I want to create a variable with a unique 
incremental
CK> name for each of the values.

CK> for example:

CK> $dra_1 = 5;
CK> $dra_2 = 8;
CK> $dra_3 = 9;
CK> How would I do this? A variable that has a variable name based on a
CK> counter in the loop? Not sure the syntax for that.
CK> Thanks
CK> Charles
something like this...

while(list($key,$val) = each($my_array)){
$n = 'dra_'.$key+1;
$$n = $val['dra_id'];
}




--
regards,
Tom

--- End Message ---
--- Begin Message ---
Hi,

Sunday, March 16, 2003, 8:20:49 AM, you wrote:
CK> Tom,

CK> This seems like what I need exactly, but I am having a bit of trouble 
CK> getting it to work.

CK> Here is how I have worked around this, but I know there is a 'real' way 
CK> to do this. Any thoughts? I had to set the variables, or should I just 
CK> use the variables as ${dra_0} etc.?

CK> // get the values for the default dra from array
CK> while(list($key,$val) = each($r_p_dras)){
CK>  $n = "dra_$key";
CK>  echo $n;
CK>  $$n = $val['dra_id'];
CK> }

CK> $dra_a = "${dra_0}";
CK> $dra_b = "${dra_1}";
CK> $dra_c = "${dra_2}";
CK> $dra_d = "${dra_3}";
CK> $dra_e = "${dra_4}";

You could use a seperate counter like this:
$x = 1;
while(list($key,$val) = each($r_p_dras)){
 $n = "dra_$x";
 echo $n;
 $$n = $val['dra_id'];
 $x ++;
}
-- 
regards,
Tom

--- End Message ---
--- Begin Message ---
If the SMTP server is running on your machine, or you have access to it's
configuration. Create an e-mail address specificaly for PHP to mail from, as
i had trouble authenticating. But if i created the mailer address as a
local user on my SMTP server, it'd be allowed through. I believe it's a
method to reduce relayed SPAM...

- Original Message -
From: "Aitor Cabrera" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, March 16, 2003 3:43 AM
Subject: [PHP] SMTP Authenticate


Hi, I'm trying to use the mail() funtion but I can only use this funtion the
email myself (the same email that I put in the php.ini file). I f I try to
email someone else I get an error

530 delivery not allowed to non-local recipient, try authenticating -7

How can I authenticate myselft? Which is the SMTP comand to do it and how do
I use it? Thanks!!

--- End Message ---
--- Begin Message ---
Last time i checked, Google does infact query strings. As some of my

[PHP] Include() in included file

2003-03-16 Thread Hubert Kowalski
Hello all!

In index.php I include a file template.php using



Works fine. In template.php I'm using include function too



Works fine on all machines I installed it till now: Windows (NT, 98), Linux
(some of them). But I installed it on FreeBSD and... surprise. When I call
index.php, all I get is "before include". No header.php content, no "after
include" phrase. And there is no warning or error message. Has anybody got
an idea what is wrong? Cheers,

Hubi



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Header order

2003-03-16 Thread John Taylor-Johnston
You do have to declare the headers first !!??

John Taylor-Johnston wrote:

> For the record, am I declaring these in the correct order?
> Thanks,
> John
>
> 
> header("Content-type: text/notabene");
> header("Content-Disposition: attachment; filename=".$dbtable.".nb");
>
> ob_start("ob_gzhandler");
> set_time_limit(150);


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Header order

2003-03-16 Thread John Taylor-Johnston
You do have to declare the headers first !!??

John Taylor-Johnston wrote:

> For the record, am I declaring these in the correct order?
> Thanks,
> John
>
> 
> header("Content-type: text/notabene");
> header("Content-Disposition: attachment; filename=".$dbtable.".nb");
>
> ob_start("ob_gzhandler");
> set_time_limit(150);

--
John Taylor-Johnston
-
"If it's not open-source, it's Murphy's Law."

  ' ' '   Collège de Sherbrooke:
 ô¿ô   http://www.collegesherbrooke.qc.ca/languesmodernes/
   - Université de Sherbrooke:
  http://compcanlit.ca/
  819-569-2064



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] create keywords meta tag dynamically

2003-03-16 Thread Veniamin Goldin
hi,

Does someone have solution how to index page and dynamically create
keywords for "keywords" meta tag ?

Based on full page content, not only on title.



Thanks !



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php