Re: [PHP] PHP & Java ?

2001-05-04 Thread Tom Carter

I assume by java you mean some permutation of javascript.

PHP runs server-side which means all the PHP processing is done before it
is sent to the client. What the client recieves has nothing to do with
PHP, that is all effectively "removed" ie parsed by the PHP engine. The
client just recieves HTML and javascript etc. The javascript the runs
"client-side" ie on the client, separate from the server and its PHP.

Long and short of it is that no, what the PHP does won't effect the
javascript. The only possibility is that in adding your database stuff you
somehow altered the javascript part of the code, or the html it refers to.
I'ld back track and check carefully if I was you.

Templates won't help directly, except that if you find one which does what
yuo want then obviously you know that will work. Personally, I prefer
writing my own stuff for my own needs.

HTH,
Tom

Tom Carter
Web Architect
roundcorners ltd.

On Fri, 4 May 2001, Jack Sasportas wrote:

> While working on some web sites which contain mouse over java, and then
> adding in some db stuff via php/mysql, the java seems to break.
> Is there something special I need to do to prevent that break?
> Is this a common problem?
> Does using templates get around that problem ?
>
> Thanks !
> ___
> Jack Sasportas
> Innovative Internet Solutions
> Phone 305.665.2500
> Fax 305.665.2551
> www.innovativeinternet.com
> www.web56.net
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] problem with PHP and .htaccess

2001-05-04 Thread Tom Carter

Hi,


I have a quite complex site organised into a series of subdirectories, all
referrencing one single include directory, specified by a global variable
required on each page. This file has sym links to all the directories, and
I've done a test output so that is not the cause of the problem.

What I'm trying to do is this, put a .htaccess over the whole lot so that
only users who are part of the pilot can get in.The site already uses
authentication for certain areas, and since this is a pilot I don't want
to put any code in just for that, a .htaccess should be able to do
everthing I want in theory.

my include line loks like this

include($includedir."header.inc");

however when I create the .htaccess file (see below) then the page fails
to include the file and prints the following error message

Warning: Failed opening 'http://www.mydomain.com/pilot/include/header.inc'
for inclusion (include_path='') in /home/sites/site4/web/pilot/index.php
on line 7

and then loads the rest of the page.

The .htaccess file I've been using is as follows.

Authname pilot
Authtype Basic
order allow,deny
allow from all
require group site4

I'm not very comfortable wit h.htaccess, not something I've used very
much. I am fairly sure that it isn't the last linethe exact same file
worked fine doing, say phpMyAdmin, with the only difference being that
phpMyAdmin has all its files in one directory.

I hope this email makes sense+please help!!

Eternally grateful

Tom Carter
Web Architect
roundcorners ltd.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Netscape and post

2001-05-05 Thread Tom Carter

Are you trying to post a form back to the same script, which will then
process it? If so then the easiest way is just



On Fri, 4 May 2001, Chris Adams wrote:

> On 4 May 2001 21:48:46 -0700, Richard Kurth <[EMAIL PROTECTED]> wrote:
> > I am having problems with Netscape and post in a form
> > In I.E. post works fine but in netscape it just gives me a
> > Method Not Allowed
> > The requested method POST is not allowed for the URL /scripts/index.html.
> >
> >
> >
> > Why is this doing this. Sometimes I just hate Netscape
>
> Presumably because the action attribute needs to have a value. Since your HTML
> is broken, Netscape is creatively misinterpreting it, as it is wont to do.
>
> Chris
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] "Free" Database Design Program

2001-05-05 Thread Tom Carter

phpMyAdmin is by for the most common...

Check out http://www.phpwizard.net/projects/phpMyAdmin/

It can do pretty much everything you want, althuogh it does assume a
knowledge of sql (i.e. it doesn't contain tools for helping y6ou construct
comples queries...not that you can really get that complex in mysql)

Hope this helps,

Tom Carter
Web Architect
roundcorners ltd.

On Sat, 5 May 2001, Augusto Cesar Castoldi wrote:

> Anyone know a "Free" database Design program? I'm needing to organize my
> MySQL databases and design new databases.
>
> regards,
>
> Augusto
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] "Free" Database Design Program

2001-05-05 Thread Tom Carter

I've not heard of such a thing, and I would doubt that there is such a
thing for mysql...generally such tools are for the db2's etc.

let me know if you find anything tho, quite intruged

Tom Carter
Web Architect
roundcorners ltd.

On Sat, 5 May 2001, Augusto Cesar Castoldi wrote:

> Ops, no. In fact I'm working with phpadmin2.
>
> But I need a program that I can document my database and even the script.
>
> The "relationships" of tables, the primary keys.
>
> To describe what each script does, what funcions they have.
>
> All this stuffs, I want to document all my system.
>
>
> regards,
>
> Augusto
>
> On Sat, 5 May 2001, Tom Carter wrote:
>
> > phpMyAdmin is by for the most common...
> >
> > Check out http://www.phpwizard.net/projects/phpMyAdmin/
> >
> > It can do pretty much everything you want, althuogh it does assume a
> > knowledge of sql (i.e. it doesn't contain tools for helping y6ou construct
> > comples queries...not that you can really get that complex in mysql)
> >
> > Hope this helps,
> >
> > Tom Carter
> > Web Architect
> > roundcorners ltd.
> >
> > On Sat, 5 May 2001, Augusto Cesar Castoldi wrote:
> >
> > > Anyone know a "Free" database Design program? I'm needing to organize my
> > > MySQL databases and design new databases.
> > >
> > > regards,
> > >
> > > Augusto
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> > >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] nslookup function ?

2001-05-06 Thread Tom Carter

A built in function in PHP (avoids running command line stuff) that does a
reverse DNS lookup on an IP address...

$host = gethostbyaddr($REMOTE_ADDR);

(took me quite a while to find this one)

HTH,
Tom
On Sat, 5 May 2001, Kurth Bemis wrote:

> At 04:11 PM 5/4/2001, Matthew Luchak wrote:
>
> goto zend.com then to the code exchange...then search for kurth bemis...i
> wrote a fucntion that does just that.
>
> ~kurth
>
>
> >I'm working on a email address verification script and need to do a DNS
> >lookup given the IP number of a remote host.
> >ie:  is [EMAIL PROTECTED] a viable address?
> >
> >get IP gethostbyname(here.net);
> >nslookup IP to get mail server address
> >pfsockopen blah...blah..blah...
> >
> >sois there a nifty yet undocumented nslookup() function out
> >there?
> >
> >
> >Matthew Luchak
> >Webmaster
> >Kaydara Inc.
> >[EMAIL PROTECTED]
> >
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Really easy question

2001-05-06 Thread Tom Carter

The easiest way is to create a simple page (called say test.php) with the
following



This should display a page with all sorts of information about your PHP,
and serves as a good test as to whether or not PHP is working

Good luck!

Tom Carter
Web Architect
roundcorners ltd.

On Sun, 6 May 2001, biscut wrote:

> How can i check to see if PHP has been enabled, I enabled the modules etc
> after they were compiled and i have managed to get Apache working properly
> again but now even when i do the basic tutorial stuff then I get a blank
> page rather than what I am supposed to get, the tutorial page is no help as
> all it says is "see your network admin to get PHP enabled" this is only on
> my home machine so I guess I am the network admin...kind of anyway...can
> someone please help...
>
> thanks very much
> biscut
>
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: [PHP] Large Memory Problem

2001-05-07 Thread Tom Carter

Hi

This isn't a PHP thing, but most unix/linux distributions have a program
called wget in. You can use this to very easily download a file to your
server (eg. wget http://www.freebsd.com/man.php)

This will download the file to the server, effectively  "fixing" it at
that so you can download it to your local machine at your leisure

HTH
Tom

 On Mon, 7 May 2001,
[iso-8859-1] Natasha wrote:

> Hi,
>
> you probably didn't understand my problem.
>
> I'm not on a very speedy connection, however having
> access to a server, which has PHP enabled, so because
> the download is generated dynamically Go!Zilla can't
> really resume to it. That's my problem, so I'm
> transferring it to my server which supports the
> CONTENT-RANGE header in the HTTP specification, and
> hence can download it.
>
> It's the FreeBSD manpages.
>
> =
>
>
> 
> Do You Yahoo!?
> For regular News updates go to http://in.news.yahoo.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Zip support

2001-05-08 Thread Tom Carter

On Tue, 8 May 2001, E. Stuart Hicks wrote:

> I see that there is support for bzip2 and gzip in PHP, so I was wondering if
> there was any standard zip support that I'm not seeing.
>
I looked and couldn't find any. The best I could find to be able to zip
unzip files was to save them on the server and use exec() to run zip on
the command line to read the files back into php. Not the best way I know,
but it worked.

HTH,
Tom
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Search a string between

2001-05-09 Thread Tom Carter

The problem is that it matches the first foo with the first /foo and the
second foo witht eh /foo ( andmatches those properly) but it also matches
the first foo with the second /foo (thisnk of the logic of the regex).
What you need to do is rather than specify any character (.*) specify any
character which is not  ie something like ^[]*

 On Wed, 9 May
2001, Luiz Vitor wrote:

> Hi...
>
> I have a text and, some words of the text have the tags  between them.
> What i'm trying to do is to replace the word between that tags for a url, wich I'll 
>search them in a database and convert to a url.
>
> It's working fine when I have only one , but when there are more than 
>one, the script converts all the text between the first  and the last 
>.
>
> I'm using this code:
>
> if (eregi("(.*)", $string, $result)) {
>$string = str_replace($result[1], ''.$result[1].'', 
>$string);
> }
>
>
> Someone knows what I have to do to put it to work???
>
>
> Thanks in advance.
>
> Luiz Vitor
> Brazil
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] ASP 2 PHP?

2001-05-09 Thread Tom Carter

I don't have any direct experience using it, but colleagues I know have
given it great reviews.

ASP2PHP script (nice name ;o) )
http://asp2php.naken.cc/

Tom Carter
Web Architect
roundcorners ltd.

On Wed, 9 May 2001, Brandon Orther wrote:

> Hello,
>
> I am looking at a complete database with it interface written in ASP.  All
> of our company programs are written in PHP and that is what I want to use.
>
> I believe I remember seeing ASP 2 PHP converts before.  Does anyone know of
> any.  They don't have to work perfect just convert it with some bugs and I
> will fixes those.
>
> Thanks
> Brandon
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Hi!

2001-05-11 Thread Tom Carter

If you know what page(s) are being used to load the end page then on these
pages you could pass the $HTTP_REFERER value from the middle page to the
end one and use that in the redirect

Tom Carter
Web Architect
roundcorners ltd.

On Fri, 11 May 2001, Johan Vikerskog (ECS) wrote:

> Hi Ben.
> I need the URL for two pages back to be saved as a variable.
> I am going to format the adress for two pages back and redirect the user to the 
>formatted URL.
>
> Sounds weird but i really nead it.
>
> -Original Message-
> From: Ben Cairns [mailto:[EMAIL PROTECTED]]
> Sent: den 11 maj 2001 10:10
> To: Johan Vikerskog (ECS); php-general
> Subject: RE: [PHP] Hi!
>
>
> You can so this with JavaScript:
>
> Go back Two Pages
>
>
> -- Ben Cairns - Head Of Technical Operations
> intasept.COM
> Tel: 01332 365333
> Fax: 01332 346010
> E-Mail: [EMAIL PROTECTED]
> Web: http://www.intasept.com
>
> "MAKING sense of
> the INFORMATION
> TECHNOLOGY age
> @ WORK.."
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Search engines and mod_rewrite

2001-05-13 Thread Tom Carter

hi all,

On one of my sites we make extensive use of variable passed through the
url, particullarly for browsing the main content of the site which is
organised into main and sub categories, eg
browse.php?maincat=Weather&subcat=sunny kind of thing.

I understand from colleagues who know much on these things that public
search engines bots (eg google) stop parsing thru that part of the site
when they reach a '?' (I could well be wrong on this).

a way around this that I have heard is installing the mod_rewrite module
in apache and mapping browse/weather/sunny to
browse.php?maincat=weather&subcat=sunny.

Would this in fact even  fix the problem? Its a hard thing to test!

Does anyone have any experience using this? And what is the advice from
people on how best to get google&co to spider your site and find your
content effectively?

Thanks in advance

Tom


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Multiple emails

2001-05-20 Thread Tom Carter

Hi all,

I have a list of email addresses pulled from a database and I want to send
out an email to all of them  (they are the registered users of this
particular site). For the first issue of the newsletter I expect to have
about 4000 people, but that will probably go up significantly in future
issues.

I can do the sending email normally and extraction of addresses, but my
question was really a more general one.
Is there anything I should be doing different when sending to so many?
Is it better to send a load of addresses altogether (in bcc for example) for
each mail call? how many?
or is it better to use a mail call for each address? I did a few quick speed
test and mail seemed to be very fast. I guess this way would have the
advantage of being able to personallise for each person.
And is there a possibility that my mails would be blocked my some kind of
spam filtering system? Its not I might add!

Any advice and past experience would be very welcome.

BTW, my system is apache on linux, php 4.0.4pl1 running on a cobalt raq.

Thanks in advance

Tom Carter
Web Architect
roundcorners ltd.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Am i crazy?

2001-11-04 Thread Tom Carter

well when you were using echo $name to test then you were outputting html,
hence no redirect... if your php is set up in such a way as to suppress
errors then you wouldn't have been warned about it..check that nothing else
is being outputted, eg a space before the first 
To: <[EMAIL PROTECTED]>
Sent: Sunday, November 04, 2001 8:24 PM
Subject: Re: [PHP] Am i crazy?


> Richard Baskett wrote:
>
> > It has to do with the $name variable, if you've fixed the code to check
> > for equality instead of setting the variable:
> >
> > if ($name=='admin') {
> >
> > Echo $name and make sure that it is actually getting set..
>
> Yes.
>
> > Also make sure your header information is before html..
>
> There isn't any html in the page at all. It's intended as a switchboard
for
> people logging in to be redirected according to user name.
>
> >let's see.. yeah
> > that's about all I can think of.. if $name is echoing something then I
> > have no clue why it's not working :(
>
> Martin S
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: how about walking another way?

2001-11-04 Thread Tom Carter

One observation on this.. there is a major difference between this and the
the header("location:...
header happens on the server side whereas the below is clientside and
therefore unreliable. I know that netscape, particullarly on unix, is bad
for ignoring this. header() is the only reliable way to do it!


> Galkov Vladimir wrote:
>
> > Good time of a day!
> >
> >  Very strange... the code you place here works good (if forget one
'=' ).
> >  I
> > thinck you have to chek what you have in $name, $MYPATH,
> > "$MYPATH/admin.php"... by the way what error you have? not such
file?
> > ...  or somth special?...
> >
> >  If still not working. (vay;-)))   ) than remember than any
> >  mission
> > can be completed in different ways try somth like this ;-)
> >
> >  if ($name == "admin")
> >   {
> > print '';
> >   }
>
> OK, thanks. That works. Strange ...
>
>
> Martin S
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] INSERT problem with MySQL/PHP

2001-06-18 Thread Tom Carter

Only a small little problem.. you called your sql query $sql and then in
your mysql_db_query line called it $sql_query..call them both the same name
and it should work!

HTH,Tom
- Original Message -
From: "Todd A. Jacobs" <[EMAIL PROTECTED]>
To: "PHP General" <[EMAIL PROTECTED]>
Sent: Tuesday, June 19, 2001 12:11 AM
Subject: [PHP] INSERT problem with MySQL/PHP


> PHP: 4.0.4pl1
> MySQL: 3.23.36-1
>
> I have the following code fragment, which uses the same connection
> parameters elsewhere to *successfully* to retrieve data from a database,
> so this doesn't appear to be a permissions problem with MySQL.
>
> However, nothing happens with inserts; no rows are added at all. All I get
> is a message form mysql_error() saying "Query was empty."
>
> Can anyone tell me what might be wrong?
>
> $user_idx  = 1;
> $objective = 1;
> $question  = 'Foo';
> $question_type = 'singular';
>
> $connection_id = mysql_connect ('192.168.1.1', 'php', 'password')
> or die ("No connection.\n");
>
> $sql = "INSERT INTO question VALUES (NULL, $user_idx, $objective,
> '$question', '$question_type', NULL, NULL)";
>
> $result = mysql_db_query('item_db', $sql_query, $connection_id);
>
> echo "";
> echo "\nDebugging output:\n";
> echo "\tSQL: $sql\n";
> echo "\tError: ", mysql_error(), "\n";
> echo "\tLast insert ID: ", mysql_insert_id(), "\n";
> echo "\tResult: $result\n";
> echo "\n";
>
> --
> Todd A. Jacobs
> CodeGnome Consulting, LTD
>




Re: [PHP] inserting a variable into a variable

2001-06-20 Thread Tom Carter

> I have come to a situation where  i am having a variable inside another
variable.
> for example.
>
> $rm_$cat_adt

PHP would read this as trying to prepend the variable $cat_adt to the
variable $rm_

You seem to be trying to insert the variable $cat into the middle of a
variable.. possible, but probably better to slightly rethink your naming
strategy

HTH,
Tom

>
> The above is a variable and $cat is again another variable
> This does not work..
>
> Need some help!
>
>
> Thanks,
> Hasan
>




Re: [PHP] Re: Lists are back up

2001-06-20 Thread Tom Carter


> Don't know about Eudora, but filters in webmailers (like gmx.de) cannot
> filter on CC, nor can Lotus Notes 4.x filter reliably on CC.  Those are
both
> products I use regularly.

Lotus Notes I beg to differ on (and now we really are a long way from PHP
discussion ;-) ).true the auto filters are pretty unreliable, but if you
write an agent (pref on server replica) then you can do just about
anything. while at IBM I had a whole host of agents running on my mail,
including doing just what you described.


If you've had a chance to look at Notes 5, it is very cool... you can even
wirte agents in full Java now!


Damn, still talking the corporate speak..

Tom

>
> Alexander Skwar
> --
> How to quote: http://learn.to/quote (german) http://quote.6x.to (english)
> Homepage: http://www.digitalprojects.com   |   http://www.iso-top.de
>iso-top.de - Die günstige Art an Linux Distributionen zu kommen
> Uptime: 2 days 23 hours 18 minutes
>




Re: [PHP] bad form...

2001-06-20 Thread Tom Carter

generally. no its not.. IMHO its a good thing it can help make data
validation easier, as in people can't "fake" variables by passing them in
the URL to the processing script.
It also helps keeps thing tidy... so providing that the processing isn't
fantastically complex (in which case the complexity of the processing may
make the physical file cumbersome)

HTH,
Tom


> hello everyone, is it 'bad form' (no pun intended) to have a form point to
> itself for processing, rather than forward the form variables to another
> page?  Anybody have any input on this?  I try to have 1 page that is the
> form and handles all the processing as well in order to keep the page
count
> on my site low and for easier editing, blah blah blah
>
> thank you for you help!
>




[PHP] Problems with include directory which falls under .htaccess protection

2001-06-23 Thread Tom Carter

Hi all,

I have a .htaccess file with the following in it
order allow,deny
allow from all
require user pilot
Authname MySite
Authtype Basic

The page itselfs prompts for and accepts username/password correctly,
however on that page are a number of included files.. The included files are
in a subdirectory of the root of the site and hence fall under the
jursidiction of the .htaccess. PHP cannot however access these.. I guess
because it also needs to be authenticated...

Oh, I checked the PHP code etc... and everything works fine...

Thanks in Advance..

Tom Carter
Web Architect
roundcorners ltd.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] run a fuction at each intervals

2001-06-26 Thread Tom Carter

Did you want these all to appear on the same page? If so then that can't be
done.. the nature of HTTP (the method of delivering pages to the browser)
doesn't allow for this sort of thing.. theres nothing PHP can do about that.

The only alternative I can suggest is for the page to refresh/redirect every
5 minutes...

> Hi..
>
> If I want to run a function at each intervals, what function I can use ??
>
> 
>
>   I try to display  " Time is Up "  each five-minute.
>
>
>  "  Time is up   "
>
>after five-minute..
>
>  " Time is up "
>
> after five-minute..
>
>   " Time is up "
>
>...
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Authentication

2001-06-26 Thread Tom Carter

To be more accurate, its IIS on Windows that causes problems.. one of our
test boxes runs windows + apache and doesn't experience this problem

> Tnx,
>
> I've been trying out some stuff last night and found out some interesting
> facts!
> the ISAPI dll is full of access violations. Being a Delphi programmer, I
> know that ain't good.
> Stable is indeed the word. Sometimes IIS could find a page, most of the
time
> not.
>
> And I got the header to show :) However the authentication part (in my
> script) was never triggered,
> due to the fact that IIS couldn't find the page anymore, if the ISAPI dll
> was used. Though luck!
>
> So, people, when using PHP authentication, please use a Linux box!!! The
> windows version doesn't really work (at all).
>
> Brave Cobra
>
> > - Original Message -
> > From: "Phil Driscoll" <[EMAIL PROTECTED]>
> > To: "Brave Cobra" <[EMAIL PROTECTED]>; "Php-General"
> > <[EMAIL PROTECTED]>
> > Sent: Tuesday, June 26, 2001 9:52 AM
> > Subject: Re: [PHP] Authentication
> >
> >
> > > If you run PHP as a CGI, or as an ISAPI module *without* installing
the
> > ISAPI
> > > filter, then IIS will have already dealt with everything to do with
> > headers
> > > before PHP gets a look in. Installing PHP in the ISAPI filters list
> allows
> > it
> > > to get at the headers and do authentication, however you may have
> serious
> > > problems with the stability of the ISAPI module version of PHP.
> > >
> > > Cheers
> > > --
> > > Phil Driscoll
> > >
> > >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] run a fuction at each intervals

2001-06-27 Thread Tom Carter

this sort of works.. I did a similar thing on a site.. but it *really* is
not what HTTP is designed for + you start to get all kinds of things... main
problem being it won't execute code afterwards to then.. if, for example, it
is displayed in a table then that won't work + some browsers may not display
a page until it is "finished", it the HTTP session is over.. which would
mean this wouldn't work.

> > Did you want these all to appear on the same page? If so then
> > that can't be
> > done.. the nature of HTTP (the method of delivering pages to the
browser)
> > doesn't allow for this sort of thing.. theres nothing PHP can do
> > about that.
> >
> > The only alternative I can suggest is for the page to
> > refresh/redirect every
> > 5 minutes...
>
> Well. what he could do is
>
> 
> while(sleep(3000))
> {
> echo "Time is up";
> flush();
> }
> ?>
>

As well as time out


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] search

2001-07-03 Thread Tom Carter

Rather than trying to break it into an array, you can examine the rightmost
character as follows

$search="dogs";
if(substr($search,-1)=='s') $search=substr($search,0,-1);

This checks if the last character is an s and if it is then set search to
the same string but without the s.. note, does not handle multiple word
queries.. for this you would need to break the string into words (something
you would probably have to do anyway) and do this for each of those...

For more info on substr seet http://php.net/substr
- Original Message -
From: "AJDIN BRANDIC" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 03, 2001 11:10 AM
Subject: [PHP] search


> Hi all
>
> I've got search facility (php-mysql) which is very simple. If i search
> for 'dog' it will find any records containing words 'dog' or 'dogs' or
> 'dogowner' etc.  But if I search for 'dogs', words 'dog' and 'dogowner'
> will not be found.  This is a classic case so there must be a solution to
> it but I cannot find one.  I tried to do something like
> if word is 'dogs' then I do the search,
> then break word 'dogs' into an array and check if the last element is an
> 's'. If it is remove it, reconstrust the string,which will give 'dog',
> and do search for that too.
> Then display results.  Well I connot find a way of breaking a string into
> an array. How do I break 'mynameis' into an array of 8 elements?
> This has got loopholes but still it is better than what I have now.
>
> Thanks
>
> Ajdin
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] poor HTML syntax crashing (!) netscape

2001-07-03 Thread Tom Carter

Hi guys,

I have an interesting situation at the moment... my (slightly sloppy) HTML
is obviously missing a closing tag here or there but displays fine in opera,
ie etc however when I try and view it netscape (4.x, windows, linux, any
platform) netscape just nice and cleanly crashes!! If anyone knows of a bug
which would cause netscape to do this then please let me know. The code in
question is very dynamic (what I mean is that it can vary by quite a lot
depending upon many many different things). Its qutie hard to debug,
especially seeing as the page returned is browser specific.. the one thing I
have ruled out is that it is JavaScript.. I removed all of that and no
change.

Any tips will be helpful... in the meanwhile I'm going to go thru all my
functions to attempt to work out what is doing it  *yawn*

TIA
Tom.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Removing Invalid Users

2001-07-04 Thread Tom Carter

You can check that the *format* of the address is valid by using regular
expressions.. look at the regular expression pages on php.net (especially
the users comments.. they do exactly that!)

As for checking whether it is a real email or not.. you can't test this
without actually sending them an email (and even then you can't be sure)...
if you could check then it would be too nice for spammers!
What you can do in addition is to check that the domain is a valid domain
(ping?)

HTH,Tom
- Original Message -
From: "Clayton Dukes" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 04, 2001 7:16 PM
Subject: [PHP] Removing Invalid Users


> Howdy folks,
>
> How can I write code that will search the database and check the validity
of
> an email address, and if it's bad, to remove that entry from the database?
>
> Here's a dump one of the tables:
>
> INSERT INTO users VALUES
> (1,'','username','[EMAIL PROTECTED]','','','001.gif','Jul 04,
>
2001','','title','location','text','',0,0,'','','','field',10,'',0,0,0,'',0,
> '','Default',4096,0);
>
> ie:
> if the email field is bad (test using sendmail?)
> remove that entry from the database.
>
> How can I do this?
>
> TIA!
>
> Clayton Dukes
> CCNA, CCDA, CCDP, CCNP
> Download Free Essays, Term Papers and Cisco Training from
http://www.gdd.net
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] File download script

2001-07-05 Thread Tom Carter

Hi all,

I have a script getfile.php which when I call like getfile.php?fileid=12 and
it returns the file to the browser with the appropiate mime headers etc..

however a problem has recently come where when I have a link to this from a
page then it prompts me to download the page I'm calling from. if I then
click open it then prompts me correctly.. any body got any idea? It never
used to do this so something has changed

TIA
Tom


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] where can I find a good documentation on regular expressions?

2001-07-06 Thread Tom Carter

Or if yu9o *really* want to learn reg-ex's then I can highly recommed
"Mastering Regular Expressions" by O'Reilly press starts from nothing
and by the end you'll find them easy as can be

HTH
- Original Message -
From: "Christian Reiniger" <[EMAIL PROTECTED]>
To: "Mick Foster" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, July 06, 2001 10:18 AM
Subject: Re: [PHP] where can I find a good documentation on regular
expressions?


> On Thursday 05 July 2001 19:33, Mick Foster wrote:
> > where can I find a good documentatio on regular expressions?
> > I´m desperate in need of it...
> >
> > thanks for your time
>
> http://php.net/manual/en/pcre.pattern.syntax.php
>
> And if you need an intro look through phpbuilder.com.
>
> --
> Christian Reiniger
> LGDC Webmaster (http://lgdc.sunsite.dk/)
>
> (A)bort (R)etry (P)retend this never happened ...
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] get a screen resolution

2001-07-06 Thread Tom Carter

The browser detection etc. capabilities all come from the HTTP_USER_AGENT
variable.. from this it is possible to interpret browser, platform and a
number of other things. Unfortunately screen resolution is not one of these.
PHP itself has no way of detecting anything about the client, only what it
is told (if that makes any sense)

The only possibility is for JavaScript to "tell" PHP about it..ie.. when a
link within the site is pressed (say from a splash screen or a login box)
then have javascript append on the resolution to the redirect url, from
which php will then know

HTH,Tom
- Original Message -
From: "Marc van Duivenvoorde" <[EMAIL PROTECTED]>
To: "Php general lijst" <[EMAIL PROTECTED]>
Sent: Friday, July 06, 2001 12:24 PM
Subject: RE: [PHP] get a screen resolution


> I know I can do it with javascript, but if possible I'd like to do it with
php.
>
> Marc van Duivenvoorde
>
> At 02:12 PM 7/6/2001 +0300, you wrote:
> >JavaScript
> >
> > > -Original Message-
> > > From: Marc van Duivenvoorde [mailto:[EMAIL PROTECTED]]
> > > Sent: 6 iulie 2001 14:18
> > > To: Php general lijst
> > > Subject: [PHP] get a screen resolution
> > >
> > >
> > > I'm trying to make a small browser and screen resolution
> > > script for my
> > > site, the browser part isn't a problem, but I can't find a
> > > function for
> > > screen resolutions, does anyone know whether such a function exists.
> > >
> > > Thanks,
> > >
> > > Marc van Duivenvoorde
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail:
> > > [EMAIL PROTECTED]
> > >
> > >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Convert MP3s using PHP ?

2001-07-06 Thread Tom Carter

> >hi,
> >is it possible to convert a mp3 file (for example
> >190kbps) to a mp3 file with 128kbps or less ?
>
> exec()
> system()

To expand upon that previous answer.. sort of. PHP can't, but if you can
find a command line utility to perform the conversion (sorry, I don't know
any of hand) then PHP can save the file to the syatem, run the utility by
exec() and then read in the resulting file.

HTH


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] My new toy!

2001-07-06 Thread Tom Carter

point 1...make you password fields of type password rather than text  Okay I need some people to jump in and try to use my site to see if it is
> working OK. I know I have a lot of work to do on it but I just want some
> feed back and to get a little more direction before I light into the code
> again.
>
> If You have some free time please play around with:
>
> http://www.futurebird.com/mapbuild3
>
>
> Thanks so much for the help!
>
> Susan
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] robot.txt file

2001-07-07 Thread Tom Carter

Hi Don,

How do you work this out? ie how do you know when you are spidered? I'm
interested in what logs and what patterns lead you to know this?

Thanks,

Tom

>
> On 07-Jul-01 Mark Lo wrote:
> > Hi,
> >
> >I don't know how to write a robot.txt file.  Can anyone send me a
> > link or a sample file.
> >
>
> that's 'robots.txt'
>
> User-Agent: *
> Disallow: /images/
> Disallow: /icons/
> Disallow: /cgi-bin/
> Disallow: /php/
> Disallow: /tmp/
> Disallow: /corp/login.html
> Disallow: /cust/login.html
>
>  ---
> But don't expect it to do anything for you, it's just a 'suggestion' to
> well-behaved spiders.
>
> My observation:
>  50% of them check & obey the file, 45% don't even check, & some 5% check
>  then try the 'prohibited' URLs
>
> 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, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: [PHP-DB] Parsing Error

2001-07-08 Thread Tom Carter

To expand on that.. printf is short for print-formatted... its a function
inherited from c (I think) which basically allows your to format variable
for the display within the function, eg if you had $x=1.2243 then you could,
for example, use ptinf to only display it as 1.22

To cut a long story short, Larry was right in his advice.. just thought I'ld
stick my ha'penny's worth in too.. give you an idea why!

> I don't see why you are using printf there try print instead or echo ;)0
> -Original Message-
> From: Jeff Grossman [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, July 07, 2001 6:56 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP-DB] Parsing Error
>
> Thanks Larry.
>
> Now I am getting a printf too few arguments error on this line:
>
> printf(" HREF=\"mailto:[EMAIL PROTECTED]?subject=$store\%20$jobdesc\";>$jobdesc >\n");
>
> Thanks,
> Jeff
> "Larry Rivera" <[EMAIL PROTECTED]> wrote:
>
> >After a brief look it appears that your call to mysql_query is
> incorrect
> >" after the query then "," then the link resource
> >
> >-Original Message-
> >From: Jeff Grossman [mailto:[EMAIL PROTECTED]]
> >Sent: Saturday, July 07, 2001 6:23 PM
> >To: [EMAIL PROTECTED]
> >Subject: [PHP-DB] Parsing Error
> >
> >I keep getting the following error:
> >
> >Warning: Supplied argument is not a valid MySQL result resource in
> >/home/httpd/html/stats/jobs/listing.php on line 33
> >
> >Warning: Supplied argument is not a valid MySQL result resource in
> >/home/httpd/html/stats/jobs/listing.php on line 43
> >
> >when I try to display the following webpage.  What am I doing wrong?
> >
> > >"http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd";>
> >
> >
> > Title
> >
> >
> > >$hostName="localhost";
> >$userName="jeff";
> >$password="jeff";
> >$databaseName="jobs";
> >$tableName="listings";
> >
> >// connnect to the database
> >if (!($link=mysql_pconnect($hostName, $userName, $password))) {
> > DisplayErrMsg(sprintf("error connecting to host %s by user
> >%s", $hostName, $userName));
> > exit();
> >}
> >
> >// select the database
> >if (!mysql_select_db($databaseName, $link)) {
> > DisplayErrMsg(sprintf("Error in selecting %s database",
> >$databaseName));
> > DisplayErrMsg(sprintf("error:%d %s", mysql_errno($link),
> >mysql_error($link)));
> > exit();
> >}
> >
> >// send the SQL queries
> >
> >$result=mysql_query("SELECT * FROM listings WHERE store='West Covina',
> >$link");
> >
> >// return how many rows
> >$num_rows=mysql_num_rows($result);
> >// check if greater than zero
> >if($num_rows!=0) {
> >printf("West Covina  >HREF=\"../test/stores.php#WC\">address");
> >while ($row=mysql_fetch_array($result)) {
> >$store=$rowid["store"];
> >$jobdesc=$rowid["jobdesc"];
> >printf(" >HREF=\"mailto:[EMAIL PROTECTED]?subject=$store\%20$jobdesc\";>$jobdesc R
> >>\n");
> >}
> >}
> >mysql_free_result($result);
> >
> >?>
> >
> >
> >
> >
> >
> >Thank you,
> >Jeff
> >---
> >Jeff Grossman ([EMAIL PROTECTED])
>
> ---
> Jeff Grossman ([EMAIL PROTECTED])
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] can't generate gif!!!

2001-07-08 Thread Tom Carter

I thought convert was an imagemagick command, rather than unix by default?
could be wrong tho...
- Original Message -
From: "Ben Bleything" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, July 08, 2001 5:23 PM
Subject: RE: [PHP] can't generate gif!!!


> Also, if you don't need to do this on the fly (or even if you do, in
> certain cases) just use 'convert', a standard unix tool (fairly
> standard, anyway).  So if, for instance, your users are uploading a gif,
> and you need a png (so that you can tweak with it), you could write it
> to a file, and then
>
> echo `convert upload.gif output.png`;
> your_functions_here('output.png');
>
> Ben
>
> -Original Message-
> From: Henrik Hansen [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, July 08, 2001 3:16 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] can't generate gif!!!
>
> "Rama" <[EMAIL PROTECTED]> wrote:
>
>  > I have problem using all image functions for gif.
>  > Does anyone have a suggestion how to convert gif images to png
> images?
>  > It's ok if I have to use other programming language instead of PHP.
>  >
>  > Ps: in case you wonder, I can't control the input file type. It will
> be
>  > very helpful if I can at least convert to other image format.
>
> what gdlib version do you use, as gif support is removed in the newer
> versions, due to license stuff.
>
> --
> Henrik Hansen
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] can't generate gif!!!

2001-07-08 Thread Tom Carter

Sensible thing to have installed.. I do lots of command line image
processing thru php on the command line.. conversion, distortions,resizing,
manipulation etc

 lol

http://www.imagemagick.org



> Oh yeah =>  That's probably true.
>
> Howver, every machine I have ever used has had convert.  I do a lot of
> photography, and so I use it a lot =>
>
> Ben
>
> -----Original Message-
> From: Tom Carter [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, July 08, 2001 9:52 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] can't generate gif!!!
>
> I thought convert was an imagemagick command, rather than unix by
> default?
> could be wrong tho...
> - Original Message -
> From: "Ben Bleything" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Sunday, July 08, 2001 5:23 PM
> Subject: RE: [PHP] can't generate gif!!!
>
>
> > Also, if you don't need to do this on the fly (or even if you do, in
> > certain cases) just use 'convert', a standard unix tool (fairly
> > standard, anyway).  So if, for instance, your users are uploading a
> gif,
> > and you need a png (so that you can tweak with it), you could write it
> > to a file, and then
> >
> > echo `convert upload.gif output.png`;
> > your_functions_here('output.png');
> >
> > Ben
> >
> > -Original Message-
> > From: Henrik Hansen [mailto:[EMAIL PROTECTED]]
> > Sent: Sunday, July 08, 2001 3:16 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: [PHP] can't generate gif!!!
> >
> > "Rama" <[EMAIL PROTECTED]> wrote:
> >
> >  > I have problem using all image functions for gif.
> >  > Does anyone have a suggestion how to convert gif images to png
> > images?
> >  > It's ok if I have to use other programming language instead of PHP.
> >  >
> >  > Ps: in case you wonder, I can't control the input file type. It
> will
> > be
> >  > very helpful if I can at least convert to other image format.
> >
> > what gdlib version do you use, as gif support is removed in the newer
> > versions, due to license stuff.
> >
> > --
> > Henrik Hansen
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: poor HTML syntax crashing (!) netscape

2001-07-09 Thread Tom Carter

Thanks for the offer... trouble was I took over a poorly designed project
which had to be expanded v quickly I agree entirely .. syntax is
key.. ended up restructuring the code from scratch...  quicker then
trying to hack the old.

> PHP will roll over and die if you leave a ';' off the end of a line, but
no
> one claims it sucks. Don't shoot the messenger

I wasn't blaming NS for not handling the HTMl, I just found it quite
surprising that poor syntax can cause the entire browser to crash! A better
comparison is a ';' missing in PHP causing the PHP engine to just shut down!

As a foot note... it was a table problem.. one bug in a nested table (in an
included included include file) that was causing it!!

Thanks
Tom


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Whats wrong with this code?

2001-07-22 Thread Tom Carter

do you mean..

$message = $IP. $PORT. $SYSTEM . $PAGE; 

. not ,

$message = $IP, $PORT, $SYSTEM, $PAGE; 





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP & Imagemagick

2001-07-22 Thread Tom Carter

How do you mean bindings?

I've used PHP and Imagemagick.. but only from the point of view of exec

Do you mean building them into PHP functions?

- Original Message - 
From: "Weston Houghton" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, July 22, 2001 11:05 PM
Subject: [PHP] PHP & Imagemagick


> 
> Does anyone know if there are PHP specific bindings for ImageMagick out
> there? If not, anyone want to work on them...
> 
> :)
> 
> Thanks,
> Wes
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] rename a directory

2001-07-24 Thread Tom Carter

on unix I think it should work for both.. can't say I know on windows..

also, why not try exec or system and just run the normal system command for
it?
- Original Message -
From: "Jeff" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 24, 2001 6:07 PM
Subject: [PHP] rename a directory


> Does anyone know how to rename a directory? There is rename() for files
> but I couldn't find anything for directories...
>
> Thanks,
>
> Jeff
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] D d d d database?

2001-07-24 Thread Tom Carter

http://www.flashkit.com has got some fantastic examples/tutorials on passing
variables to/from flash, including to PHP and a database.. should have
everything you want there..

> Take a look at tutorials on www.devshed.com .. or a few simular websites..
> they sould help you..
>
> I'm not sure about inserting data from a flash movie..
>
> You should check this lists archive for more info on this.
>
> Bye,
>
>
> B.
>
>
> At 17:37 23-7-01 -0700, Kyle Smith wrote:
> >ok i dont know the first thing about data bases so could someone please
> >guide me through the process of making a score board for a flash game i
> >have made with the variables $name and $score??
> >(note: i have hosting at f2s.com so i have to use myADMIN)
> >
> >-legokiller666-
> >http://www.StupeedStudios.f2s.com
> >New address new site
> >
> >ICQ: 115852509
> >MSN: [EMAIL PROTECTED]
> >AIM: legokiller666
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Apache/phpinfo

2001-07-24 Thread Tom Carter

create a file on one of your websites, say call it test.php and in it put
the following




- Original Message -
From: "Tom Malone" <[EMAIL PROTECTED]>
To: "PHP Users" <[EMAIL PROTECTED]>
Sent: Tuesday, July 24, 2001 8:14 PM
Subject: [PHP] Apache/phpinfo


> How can you tell if your host has PHP installed as mod_php or in CGI mode
on
> the webserver (Apache in my case)? Is it in phpinfo.php? If so, where - I
> couldn't find it...
>
> Thanks
> Tom Malone
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] my php script is very slow. help?

2001-07-27 Thread Tom Carter


Do you have many DB queries? What is the average size of the result
returned?

have you tried running timing functions on it to get a measure of how long
the page is taking? theres many examples on the web..

You can also use these to calculate the time for different sections.. that
should help you work out what is taking the time.

HTH,Tom

>
>
> Hi all
>
> I have Linux/PHP/MySQL. Some of my script really run
> very slowly. painfully slow. All data are fetched from
> the database. The tables in database are indexed.
> Still  some scripts are very slow. I am using nested
> while and for loops. Any idea how to make them faster?
>
> What should I avoid in my scripting?
>
> thanks all
>
> 
> Do You Yahoo!?
> Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
> or your free @yahoo.ie address at http://mail.yahoo.ie
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] how can i send SMS from Php Scripts ?

2001-08-01 Thread Tom Carter

There is an open source WAP/SMS gateway, Kannel.. altho the project has gone
thru some problems of late (the company who all the main developers worked
for has gone bankrupt :-( )
Bear in mind tho you can't send for free, you will need to install a modem
of sorts into the computer and have a contract with SMSC (service centre)
for it. in england I pay about 2 pence a msg (much less than a "normal"
phone)

HTH, Tom
- Original Message -
From: "Damien CAMUS" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, August 01, 2001 10:51 AM
Subject: [PHP] how can i send SMS from Php Scripts ?


> Sorry for my english but i'm french
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Spot the difference?

2001-08-02 Thread Tom Carter

A fairly detailed disucission, altho slightly out of date

http://php.resourceindex.com/Documentation/Reviews_and_Analysis/PHP_vs._ASP/

and one on the dangers of advocacy

http://www.perl.com/pub/a/2000/12/advocacy.html


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Mysql Help #2

2001-08-03 Thread Tom Carter

Depends what is to happen to the array afterwards, but in general no.

An interesting thing is to put timing method calls around a block of code in
question, you will find something like this (depending upon size of db)
takes somehting like 0.005 seconds. Timing things can be useful measures of
a pages overhead (one page on a site I hvae currently takes almost 2 seconds
on average to build...eek!)

"elias" <[EMAIL PROTECTED]> wrote in message

- Original Message -
From: "elias" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 02, 2001 9:31 AM
Subject: [PHP] Mysql Help #2


> Hi again.
>
> $result = mysql_query("SELECT id FROM table");
> $id_array = array();
>
> while ($r = mysql_fetch_array($result))
>$id_array[] = $r["id"];
>
> // now $id_array[] is an array of IDs that was grabbed from the database.
>
> Any faster and/or better approache to build the $id_array?
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] php date bug ?

2001-08-03 Thread Tom Carter

Just to throw one more unwelcome cat amongst the pigeons..

Different countries/time zones have summer time, I think almost all
countries do, but the actual days when they switch vary from country (yes I
know, bloody nusiance isn't it?)

I know as an example of this theres about three weeks of the year where new
york is 6 hours behing UK, and the rest its only 5.

HTH

- Original Message -
From: "Johnny Nguyen" <[EMAIL PROTECTED]>
To: "Steve Brett" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, August 03, 2001 4:25 PM
Subject: RE: [PHP] php date bug ?


> I'm in the exact same position.  It's definitely not a PHP problem.
>
> The problem with the way you're redefining your timestamp is that you may
> get January 32, June 31st, etc.
>
> I'm tempted to simply check for spring-forward and fallback before I
advance
> the timestep, but that's one extra if statement as much as 31 times in one
> month.  1000 people generating the calendar would create 31000 extra if
> statements, unless I get a Cache solution.  There should definitely be a
PHP
> function for getNextDay(), but until then, I'm going to use the extra if
> statement.
>
> regards,
> Johnny Nguyen
>
> -Original Message-
> From: Steve Brett [mailto:[EMAIL PROTECTED]]
> Sent: Friday, August 03, 2001 7:56 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] php date bug ?
>
>
> hi,
>
> i've got a calendar and i produce a month sort of outlook / filofax view
> that shows the user's appointments for that month.
>
> the way i was building it was but defining ADAY in the following manner:
>
> define("ADAY", (60*60*24) );
>
> once i'd done evrything i needed to do i incremented the timestamp for the
> day by ADAY.
>
> all seemed ok but then one of the users pointed out that October 28th
> appeared twice and then month had 32 days in for this year.
>
> after a bit of head scratching we realised that the clocks go forward (any
> foreign readers please excuse the rediculous way the british time system
> works) and technicallay i guess october 24th has 25 hours. thus the time
was
> incremented to a stamp within the same day.
>
> redfining the stamp as
>
> $start3=mktime(0,0,0,$dayArray[mon],$dayArray[mday]+1,$dayArray[year]);
>
> does work however ?
>
> is it php or the server that's at fault ?
>
> Steve
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] 404's and requesting page

2001-08-05 Thread Tom Carter

hi all,

I'm using an apache directive to redirect 404's to one of my own pages, and
i was wondering it is possible find out what the request was that caused
404.

I've examind all the global vairables etc, nothing I can see there.

If the 404 came from a link then I can find out the page with the link, but
that isn't what interests me.

system: apache, linux, php 4.0.6

Anyone got any ideas?

TIA, Tom



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] 404's and requesting page

2001-08-05 Thread Tom Carter

Thanks for the advice Tim, however it didn't work. Neither of the statements
in your mail were set ... I trued $REDIRECT_STATUS and that was set to 401
(even tho that doc wasn't capturing that error) and $REDIRECT_URL was set to
the path of the file handling the errors.

Is there some other apache config I need to make?
The .htaccess line I have doing the redirect is
ErrorDocument 404 path/to/file

Thanks a million for any help, Tom

> $HTTP_SERVER_VARS["REDIRECT_STATUS"] will be "404" (or "403" if you trap
> those too).
>
> $HTTP_SERVER_VARS["REDIRECT_URL"] will be the requested URL that caused
> the error.
>
> - Tim
>   http://www.phptemplates.org
>
> On 05 Aug 2001 18:46:04 +0100, Tom Carter wrote:
> > I'm using an apache directive to redirect 404's to one of my own pages,
and
> > i was wondering it is possible find out what the request was that caused
> > 404.
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] 404's and requesting page

2001-08-06 Thread Tom Carter

Very odd.. I checked REQUEST_URI and outputed phpinfo() as you suggested and
nowhere does it say the name of the file that was requested.. is this a
server configuration issue?

All the variables relating to pages are set to the page that is displaying
the error rather than the request that is producing it... nowhere was that
name menionted!

Anyone? Is this just me being strange?


> Ah, yes.  You are correct about the $REDIRECT_URL thing.  I was looking
> at some old code I had to deal with this and mis-read it. :)
>
> I use ErrorDoument just as you describe.
>
> I just tried this, and on my system $HTTP_SERVER_VARS["REQUEST_URI"]
> contains the URI that generated the error.
>
> If your 404 page just dumps phpinfo() you can see the list of variables
> available to your script.
>
> - Tim
>
> On 05 Aug 2001 21:16:29 +0100, Tom Carter wrote:
> > Thanks for the advice Tim, however it didn't work. Neither of the
statements
> > in your mail were set ... I trued $REDIRECT_STATUS and that was set to
401
> > (even tho that doc wasn't capturing that error) and $REDIRECT_URL was
set to
> > the path of the file handling the errors.
> >
> > Is there some other apache config I need to make?
> > The .htaccess line I have doing the redirect is
> > ErrorDocument 404 path/to/file
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] 404's and requesting page

2001-08-06 Thread Tom Carter

If anyone is interested I fixed this problem in a sudden (rare) moment of
inspiration...

in the htaccess statement I had put ErrorDocument 404
http://www.mysite.com/error/error.php rather than /error/error.php

This caused apache to basically start a separate request rather then pass it
on thru, which explains why the variables were as they were and why the
status was 401 rather than 404.

Obvious really when one thinks about it.

Thanks for you advice tho tim, much appreciated.

Tom
- Original Message -
From: "Tom Carter" <[EMAIL PROTECTED]>
To: "Tim" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, August 06, 2001 2:45 PM
Subject: Re: [PHP] 404's and requesting page


> Very odd.. I checked REQUEST_URI and outputed phpinfo() as you suggested
and
> nowhere does it say the name of the file that was requested.. is this a
> server configuration issue?
>
> All the variables relating to pages are set to the page that is displaying
> the error rather than the request that is producing it... nowhere was that
> name menionted!
>
> Anyone? Is this just me being strange?
>
>
> > Ah, yes.  You are correct about the $REDIRECT_URL thing.  I was looking
> > at some old code I had to deal with this and mis-read it. :)
> >
> > I use ErrorDoument just as you describe.
> >
> > I just tried this, and on my system $HTTP_SERVER_VARS["REQUEST_URI"]
> > contains the URI that generated the error.
> >
> > If your 404 page just dumps phpinfo() you can see the list of variables
> > available to your script.
> >
> > - Tim
> >
> > On 05 Aug 2001 21:16:29 +0100, Tom Carter wrote:
> > > Thanks for the advice Tim, however it didn't work. Neither of the
> statements
> > > in your mail were set ... I trued $REDIRECT_STATUS and that was set to
> 401
> > > (even tho that doc wasn't capturing that error) and $REDIRECT_URL was
> set to
> > > the path of the file handling the errors.
> > >
> > > Is there some other apache config I need to make?
> > > The .htaccess line I have doing the redirect is
> > > ErrorDocument 404 path/to/file
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] storing team members---suggestions on approach?

2001-08-06 Thread Tom Carter

Use three tables, one from projects one for members one for assignments

Projects

projectid
projectname
length
description
and whatever else


members
===
memberid
name
category


workingon

memberid
projectid

so each member can be in one or many projects and each project can have one
or many members
if members can only be on one project then you could in theory do it with
tables

so to sellect all members of project with id X

SELECT m.* FROM members m, workingon w WHERE m.memberid=w.memberid AND
w.projectid=X

Hope this helps,
- Original Message -
From: "garman" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 06, 2001 2:53 PM
Subject: [PHP] storing team members---suggestions on approach?


> I've got a fairly simple problem, and I'm not really sure how to approach
it.
> I'm creating a website for team projects, where the project information is
> stored in a MySQL database.  I want folks to be able to name their
project,
> indicate it's length, have a verbal description, etc.  The gathering and
> handling of that information is fairly straightforward.
>
> Each team project obviously has team members.  But the number of team
members
> is variable.  Furthermore, team members can be in one of two categories.
I'm
> not really sure how I should best store team members in the database.
> Ideally, it would be nice to have a database field for every team member,
but
> if there is ever a team with one more member than I have fields... that's
a
> big problem.  So my other thought was to just have two fields for team
members
> (one for each category), and within that field just have a comma (or
> semicolon, etc) delimited list of employee names.  Another thought is to
make
> a table just for employees, where one field of that table maps the
employee to
> a project (project are contained in another table).  That table could also
> have a field that indicated the member's category.
>
> Any thoughts on my current ideas, or suggestions for something better?
>
> Thanks!
> Matt
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Search Engines

2001-08-06 Thread Tom Carter

Hi All,

Does anyone have any experience with registering sites on the major search
engines? I have a number of questions I hope to find help with (and please
do excuse that not all of them are directly PHP related)

-Do search engines treat .html and .php files differently in caching etc?

-I include a standard header on each page, and was originally going to put
into this standard all the various meta tags to describe the site, however
someone suggested to me that this counetd against you by some search
engineanyone have any knowledge on this?

-How is it best to create meta tags? does anyone know of php or other tools
or good guides?


Any other general advice more than appreciated!


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] FYI: PHP scripts that return files

2001-08-06 Thread Tom Carter

Hi All,

This is something I have working nicely now, and I know theres been posts on
here before without any satisfactory answer, but this eeems to cover all.

When you have a script that returns a file, you obviously want to return a
file which looks right.
Ths initially simple looking way of doing this is by using the "Content
Disposition" header.
This however has many problems.. when calling a script say
getfile.php?name=my_file which looks up in the database to find that file
and return it, a lot of browsers may (intermittently) prompt you to
open/save getfile.php.. you then have to open this (sometimes twice) to be
prompted to download my_file.zip.

The solution... sadly its not a PHP one.
On apache theres an extention called mod_rewrite (there are equivalents for
other servers) that basically uses regular expression to rewrite urls (which
can be useful in soo many situations). using this you can specify a rule
something like

RewriteRule /downloads/([^/.]+).zip getfile.php?name=$1

which basically says that if the user requests the url of something like
/downloads/silly.zip then it is redirected to getfile.php?name=$1..neat,
huh?

Remove the Content Disposition line from your php script and it will all
work wonderfully well!!

Also good for DB stored images you don't want to appear as .php!

hope this helps some people...

Tom "Rambling" Carter


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] I HAVE A PROBLEM HERE...

2001-08-07 Thread Tom Carter

Generally I would expect one of two possibilities in this scenario..
either
a) you are passing thru the url (limited I believe to about 255
characters)...if so use a form with METHOD=post
or
b) you are storing in a DB and the size of the field in the db is too small
(in general most rdbms' will just cut the string off to fit without any
warning).

Have you tried doing a dump of $HTTP_POST_VARS and $HTTP_GET_VARS?

HTH,Tom
> i assume you mean your passing the variable as part of
> the url...PHP_SELF?a=something (is this what your
> doing)  if so make sure you  use
> rawurlencode/urlencode before passing the variable and
> rawurldecode/urldecode on the variable afterwards...
>
>
> --- Joshman <[EMAIL PROTECTED]> wrote:
> > the php file wont submit to the next file (which is
> > th same file actually:
> > $PHP_SELF ) because the variable is too big for some
> > reason aparently, evn
> > though i have other variables larger than that
> > particular one...
> >
>
>
> __
> Do You Yahoo!?
> Make international calls for as low as $.04/minute with Yahoo! Messenger
> http://phonecard.yahoo.com/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] function into string

2001-08-07 Thread Tom Carter

Try readin the manual before posting.. all you want is the string
concatenation operator .

PHP is weakly typed so no direct conversion is needed

echo "balalala " . trim(odbc_result($result_id,3)) . " aasasasas"

> Sorry for the dummies question, but how do I insert into string like:
>
> echo "balalala"
>
>  how to insert function in the midle like :
> echo "balalala [trim(odbc_result($result_id,3))] aasasasas"
>
>
>  Thank you.
>
> > - Original Message -
> > From: "René Moonen" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Tuesday, August 07, 2001 2:02 PM
> > Subject: [Re: [PHP] user's ip]
> >
> >
> > > The problem is that REMOTE_ADDR returns the IP address of the proxy
(if
> > > the user
> > > accesses the web-page via a proxy. This will allways return the IP
> > > address of
> > > the user's machine:
> > >
> > > if(getenv(HTTP_X_FORWARDED_FOR))
> > > {
> > >   $ip=getenv(HTTP_X_FORWARDED_FOR);
> > > }
> > > else
> > > {
> > >   $ip=getenv(REMOTE_ADDR);
> > > }
> > > $host = gethostbyaddr($ip);
> > >
> > >
> > > Renze Munnik wrote:
> > >
> > > > On Tue, Aug 07, 2001 at 03:55:25PM +0530, Adrian D'Costa wrote:
> > > > > Hi,
> > > > >
> > > > > I am trying to get the ip address of any user browsing a
particular
> > page.
> > > > >
> > > > > I tried $REMOTE_ADDR but that give me only the remote address.
What
> > would
> > > > > be the best way?
> > > > >
> > > > > Adrian
> > > >
> > > > Okay... Help me out here...
> > > > You want to know someones IP-address and using $REMOTE_ADDR you get
> > > > the IP-address of the user. What's the problem man?!?!?!
> > > >
> > > > --
> > > >
> > > > * R&zE:
> > > >
> > > > -- 
> > > > -- Renze Munnik
> > > > -- DataLink BV
> > > > --
> > > > -- E: [EMAIL PROTECTED]
> > > > -- W: +31 23 5326162
> > > > -- F: +31 23 5322144
> > > > -- M: +31 6 21811143
> > > > -- H: +31 23 5516190
> > > > --
> > > > -- Stationsplein 82
> > > > -- 2011 LM  HAARLEM
> > > > --
> > > > -- http://www.datalink.nl
> > > > -- 
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail:
[EMAIL PROTECTED]
> > >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Apache Directives

2001-08-08 Thread Tom Carter

What you are looking for isn't a php function, but a module in apache called
mod_rewrite..this is usually installed in most apaches, if not can be done
easily.

so in the stie .htaccess (or indeed in the master conf) you would do
something like

RewriteEngine On
RewriteRule ^/login/[a-zA-z0-9]* /login/something.php


- Original Message -
From: "Sean Cook" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, August 07, 2001 11:00 PM
Subject: [PHP] Apache Directives




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] IP security check

2001-08-08 Thread Tom Carter

Another point is to remember that each page request may come from a
different IP address.

For example, where I work in IBM, every out going connection goes from one
of 30 or so boxes, each with their iwn IP, so in the process of browsing a
site each request for a file can come from one of those IP's.

- Original Message -
From: "matt" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, August 07, 2001 9:37 PM
Subject: [PHP] IP security check


> For secure payment pages, I need for the code to determine the persons IP
> address, even if they have a "spoofer" running. Is this possible? Getting
> around the spoofer in order to catch criminals using illegal credit card
> #'s..
>
> thanks
> -matt (cs student)
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Non english european character conversion

2001-08-08 Thread Tom Carter

Hi All,

I was wondering if there exists, either in PHP (I can't find anything) or
something someone has written (again, my searches have been fruitless) to
convert non-english european characters to the english equivalents eg å to a
etc.

TIA, Tom


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] How to post unknown amount of data ?

2001-08-08 Thread Tom Carter

The best way of doing this is to name the fields catid[]
The [] means that they are inserted into an array in the order they appear
on the page, so on the page with deals results you just have to cycle
through the array.

As a side point, there is no way of telling what has been modified and what
is not (well without comparing the variables to the db again).. so it is
usually quicker just to update the whole.lot.

HTH, Tom
- Original Message -
From: "vz" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, August 08, 2001 12:00 PM
Subject: [PHP] How to post unknown amount of data ?


> Hello all,
>
> I'm having a trouble. I'm programming an CMS
> for one pc company. So in example i'm doing
> a pc category catalog admin. They can add/delete/modify
> theese category's. But also they want one feature:
> they want to edit all category's in one form.
> So i made a form that displays all category's in
>  so they can edit, but
> the problem is that i dunno how many there will
> be category's and how to organize data passing to
> script. User submits form with all changes,
> and my script needs to get all theese category's
> with id's and changed names.
>
> Ok how it looks in script:
>
> Function display_all() {
> Print "
> ";
> $result=mysql_query("SELECT cat_id,
> cat_name,
> cat_show
> FROM cat
> GROUP BY cat_id ASC");
> While ($row=mysql_fetch_array($result)) {
> $cat_id=$row["cat_id"];
> $cat_name=$row["cat_name"];
> $cat_show=$row["cat_show"];
> Print " size='2' maxlength='4' value='$cat_id'
> disabled>\n";
> Print " size='50' maxlength='50' value='$cat_name'>
>  if ($cat_show=="Y") {Print " checked";}
> Print ">\n";
> }
> }
>
> // ^^^ this form post all data into same file 
> file://and function add_all_db() must get all data.
>
> Function add_all_db(){
> ?
> // here i must add theese changes to db
> // i know how to add to db, but dunno
> // how to get forms passed data.
> }
>
> PHP Version 4.0.4pl1
> MySQL Version 3.22.30
>
> Thank u for your help.
> Vilius Zigmantas aka vz
> [EMAIL PROTECTED]
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP in corporate settings?

2001-08-09 Thread Tom Carter

In my experience Scandinavia (well nordic really, can't forget finland) and
germany (and a few other european countries...notably not england) are much
more open to open source (no pun intended) to open source and the like..
their concerns are sensible ones. Something in the mentality. northern
america/UK etc are much more short-sighted in their perspective.

Just a norwegians point of view, thats all...


> On Thu, 9 Aug 2001, Jeff Lewis wrote:
>
> > Yes I had wondered if someone was going to make that claim :)
> >
> > So far I haven't seen much in perl or Java that I CAN'T do in PHP.  The
user
> > community is much more helpful, the PHP manual online is IMO simply
amazing.
> > I love that guide :)
> >
> > I just rarely see any jobs posted for PHP.  Mostly ASP and Java.
>
> Just a plug for my favorite country.. :)
>
> There are tons of jobs in Germany for PHP developers.. some
> of the largest CMS providers who sell systems for 20K-200K
> EUR deploy PHP and they often have a growing need for more
> developers.
>
> Germany is generally quite open towards PHP and related
> technologies; the first dedicated PHP conference was held in
> Germany last year; second, the Government is actually pushing
> the development of open-source technologies and actively
> participates in certain events and open-source conferences;
> third, Germany has now a full-blown registered association
> which will actively work on the promotion of PHP.
>
> - Sascha Experience IRCG
>   http://schumann.cx/http://schumann.cx/ircg
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] cropping a string

2001-08-13 Thread Tom Carter

hi all

I was wondering if anyone had found a solution to the problem of cropping a
string to a certain length...however a certain length based upon the actual
"size" of it. By this I don't mean after n characters, or even after m words
(have a function for this already)... what I'm looking for is function that
will take a string and crop it down to a length dependant upon its size, ie.
it would treat a w different to a l (apologies to those reading this on a
monospaced client). I'm guessing such a function would take type of font
(say, serif ot times) and the desired length in "standard" characters and
then compare the string, translating each character into a length
comparative with the standard character.

I appreciate tha because of the nature of the medium that it becomes
difficult to control how things appear on browsers, and that it would be
nigh on impossible to make an *exact* function, all I'm looking for is
something rough and ready which is better then counting chars.

TIA, Tom


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: cropping a string

2001-08-13 Thread Tom Carter

Thanks for the reply chris, altho that was what I had already. Guess it's
down to me measuring chars myself then :-(
- Original Message -
From: "Chris Lee" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 13, 2001 10:28 PM
Subject: [PHP] Re: cropping a string


> function truncate($string, $size)
>  {
>   $new_string = substr($string, 0, $size);
>
>   $new_string = explode(' ', $new_string);
>   array_pop($new_string);
>   $new_string = implode(' ', $new_string);
>
>   return $new_string;
>  }
>
> this function can defn be improved apon.  all this does is trims the
string
> to the spec length and takes the last word (or pastial word) off.
>
> you might want to take a look at wordwrap() too, probably not what your
> looking for though.
>
> --
>
>   Chris Lee
>   [EMAIL PROTECTED]
>
>
>
> "Tom Carter" <[EMAIL PROTECTED]> wrote in message
> 01ea01c1243c$36fd1d40$0a00a8c0@bjorn">news:01ea01c1243c$36fd1d40$0a00a8c0@bjorn...
> > hi all
> >
> > I was wondering if anyone had found a solution to the problem of
cropping
> a
> > string to a certain length...however a certain length based upon the
> actual
> > "size" of it. By this I don't mean after n characters, or even after m
> words
> > (have a function for this already)... what I'm looking for is function
> that
> > will take a string and crop it down to a length dependant upon its size,
> ie.
> > it would treat a w different to a l (apologies to those reading this on
a
> > monospaced client). I'm guessing such a function would take type of font
> > (say, serif ot times) and the desired length in "standard" characters
and
> > then compare the string, translating each character into a length
> > comparative with the standard character.
> >
> > I appreciate tha because of the nature of the medium that it becomes
> > difficult to control how things appear on browsers, and that it would be
> > nigh on impossible to make an *exact* function, all I'm looking for is
> > something rough and ready which is better then counting chars.
> >
> > TIA, Tom
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] MySql or flat database using PHP ?

2001-08-18 Thread Tom Carter

Dave,

Unless there is a strong reason for using files (like for example it
interfaces with a different app which uses files) then the case for a proper
RDBMS (eg MySQL) is the better choice.

Databases are much easier (/quicker) to add and delete records from, search
etc

HTH,
Tom
- Original Message -
From: "David Ovens" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, August 18, 2001 9:29 PM
Subject: [PHP] MySql or flat database using PHP ?


Before I start creating an Sql table/database, thought I would ask for
advice first.

I am creating a directory online, with urls information, links, email
addresses etc etc.  What do you think is best a MySql database or writing it
to a file using fopen/fwrite (flat file) ???  Your thoughts would be very
much appreciated.


Thanks

Dave






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Protecting include files

2001-08-19 Thread Tom Carter

In addition to this you can place the file out of the web tree PHP can,
AFAIK, include files based on their absolute file path, eg /home/config.inc.
This means that there is no way to directly browse to a file

(web tree is the part of a server/whatever that the webserver (eg apache)
uses to load files when requested to)

> Hi,
>
> I have a php script which includes .inc files. Is there any way in which I
> can prevent a normal surferfrom viewing these files. Is there any command
> that I can add to a .htaccess file.
>
> Thanks
>
>   ~~~  \\__
> ! SIDDHARTH HEGDE /   CHAOSGAMERZ.COM !
> !  Webmaster  \  For PC Game screeshots, cheat!
> !   http://www.ChaosGamerz.COM o| o  codes, trainers, downloads,  !
> ![EMAIL PROTECTED]( |_   game music, FREE e-mail and even !
> ! ICQ 84475206 |--   FREE FULL VERSION games for that !
> ~~ \___/ 486--
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Files from db vs. filesystem (was MySql or flat database using PHP)

2001-08-19 Thread Tom Carter

Andrew/All,

Following on from this I am interested to find out some performance
comparisons/opinions of
storing files in a db vs. storing in the file system and being redirected by
php

I think I've heard from elsewhere that file system is more effecient.

The sistuation storing is pretty much a "one-off" activity, but accesses
will be frequent. Files are small, ranging from 30k to 250k.

Anyone have any comments/benchmarks? My attempts at testing the two have
been sloppy to say the least.

TIA, Tom
- Original Message -
From: "Andrew Libby" <[EMAIL PROTECTED]>
To: "David Ovens" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Sunday, August 19, 2001 3:20 AM
Subject: Re: [PHP] MySql or flat database using PHP ?


>
> Dave,
> IMHO, a major consideration for Web apps is contention and s
> synchronization.  If you intend to allow users to update
> data on in the app it becomes important to coordinate writes
> (with locking) so that no two users can write to the same (region)
> of the file at the same time.  An RDBMS (MySQL, PostgreSQL) or a directory
> (OpenLDAP) takes care of this (as well as many other problems
> with data storage and retrieval).  I agree with the other statements I've
> seen here, but wanted to add this as well.   I've done it both ways
> and the DBMS, Directory route tends to be a better solution.   This is
> code reuse of the best kind.
>
> My humble $0.02.
>
> Andy
>
>
> On Sat, Aug 18, 2001 at 09:29:56PM +0100, David Ovens wrote:
> > Before I start creating an Sql table/database, thought I would ask for
advice first.
> >
> > I am creating a directory online, with urls information, links, email
addresses etc etc.  What do you think is best a MySql database or writing it
to a file using fopen/fwrite (flat file) ???  Your thoughts would be very
much appreciated.
> >
> >
> > Thanks
> >
> > Dave
> >
> >
> >
>
> --
> --
> Andrew Libby
> Director of Technology
> CommNav, Inc
> [EMAIL PROTECTED]
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] class variables and methods

2001-08-19 Thread Tom Carter

There was a long discussion on this in a java forum I am part of, the
product of which was basically this...

1. All variables in a class are best left to be private (not sure PHP has
this, but the programmer can work the principle in mind.. that is only the
class can access them).
2. Generic variable access/store methods should be avoided - the principle
is that the internal variable can change name etc. without the external
interface having to worry about it.
3. Method to set/fetch each variable - it may seem a counter intuitive way
of doing it, especially when it is possible to do something "nice" like the
set method below. This seems a very "un-web" way.. and this is where a
difference comes in. Web is not inherently OO, and a lot of the practices of
web programmers are at conflict with more "traditional" apps programmers.
Web tends to go for speed and simplicity, rather than good design etc.
4. Some situations could theoretically arise where it is necessary to set an
unknown amount of variables within a class, however it would be far more
sensible to put these into an array.

In summary, in good OOP you should have a method for every get/set operation
on variables that is required, using arrays as appropiate.

Going back to the original point on whether or not to access the variable
directly or build a set function in, they are both as bad as each other,
just about. They both access variables directly and require the outside
program to have knowledge of variable names etc. and it doesn't allow for
checking for "correct" values being set ( a useful thin with the above
method)

Hope this helps, let me know if I can provide any more advice.

Tom

- Original Message -
From: "Andrew Libby" <[EMAIL PROTECTED]>
To: "Joe Sheble (Wizaerd)" <[EMAIL PROTECTED]>
Cc: "General PHP List" <[EMAIL PROTECTED]>
Sent: Sunday, August 19, 2001 3:34 AM
Subject: Re: [PHP] class variables and methods


> Joe,
> There are varying opinions on this issue.  The argument for
> methods is that it hides the internal structure of your class.  This
> is always a good thing.  This means that the internals of the class
> can be changed, but the user interface (the user is the programmer here)
> does not change.  So this alternative implementation of someclass
>
>
> class someclass

> var $data = false;
>
> function set($key,$val) {
> $this->data[$key] = $val;
> }
> }
>
> is no different the the calling code.  In general, I tend to have an
> accessor/mutator method for each 'property' that I would like to
> provide access to.  I'd have a method for each $key that I want to
> support (this may not apply in your case).
>
> class someclass

> var $name = false;
> var $age  = false;
>
> function name()

> if(func_num_args()) $this->name = func_get_arg(0);
> return $this->name;
> }
>
> function age()

> if(func_num_args()) $this->age= func_get_arg(0);
> return $this->age;
> }
> }
>
> Now, this gets a big annoying to code since the lions share of my
> classes have the name method implementations.  I've been hunting
> for a way to create methods dynamically, but I've only found one.
> To create class definitions on the fly and eval() them.  This
> works great when you've got a huge number of properties
> (class/instance vars).  I'll construct a static method on the
> class that processes examines the class vars (get_class_vars())
> and defines a class extending my implementation.   The
> sub class has the methods implemented for accessing/mutating
> the properties I'd like to have methods for.  If anyone knows
> of a means to do this to an existing class (say using create_function()
> or something), I'd love to hear about it.
>
> Andy
>
>
> On Sat, Aug 18, 2001 at 07:09:08PM -0700, Joe Sheble (Wizaerd) wrote:
> > I've been doing some reading up on OOP in PHP, and looking at some of
the
> > classes available on the web, and I've got what is probably a stupid
> > question.  I've seen this many many times..
> >
> > class someclass {
> > var $somevar = "someval";
> >
> > function set( $key, $val ) {
> > $this->$key = $val;
> > }
> > }
> >
> > $myClass = new someclass;
> > $myClass->set( "somevar", "someotherval" );
> >
> > why write a set method when you can just as easily call
> > $myClass->somevar = "someotherval";
> >
> > Is there a reason for this?
> >
> > Also, alot of the different table classes (an OOP approach to HTML
tables)
> > stores the data in arrays, but at what point is it too much to store
into an
> > array?  Say you have a forum and the text entered for a single respone
could
> > be quite lengthy, much less for 100 replies...  wouldn't that be a bit
much
> > to store into an array?  I know it depends on the system resources, but
is
> > there a practical limit that people follow?
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTE

Re: [PHP] mysql , postgres

2001-08-19 Thread Tom Carter

What would you say the advantages were?

other than just the fact the the postgres implementation of sql is more
powerful (sub-selects etc).

I'ld be very interested to see some performance comparisions if anyone has
any
- Original Message -
From: "Chris Lambert" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, August 19, 2001 10:21 AM
Subject: Re: [PHP] mysql , postgres


> MySQL is easier to use and faster to develop with for 90% of web
> applications. Sure, PostgreSQL has some huge advantages, but not everyone
> needs the same thing.
>
> /* Chris Lambert, CTO - [EMAIL PROTECTED]
> WhiteCrown Networks - More Than White Hats
> Web Application Security - www.whitecrown.net
> */
>
> - Original Message -
> From: nafiseh saberi <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Sunday, August 19, 2001 4:24 AM
> Subject: [PHP] mysql , postgres
>
>
> |
> | hi.
> | why most of you , use mysql and not
> | postgres?
> | nafiseh.
> |
> | --
> | PHP General Mailing List (http://www.php.net/)
> | To unsubscribe, e-mail: [EMAIL PROTECTED]
> | For additional commands, e-mail: [EMAIL PROTECTED]
> | To contact the list administrators, e-mail: [EMAIL PROTECTED]
> |
> |
> |
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] mysql , postgres

2001-08-19 Thread Tom Carter



> Chris Lambert wrote:
> >
> > MySQL is easier to use and faster to develop with for 90% of web
> > applications. Sure, PostgreSQL has some huge advantages, but not
everyone
> > needs the same thing.
>
> easier to use ? I'm not sure why anyone would say that
> faster to develop ? nope - I find postgresql quicker to develop with, I
> can use triggers to cut out a whole heap of extra php code.
> MYsql lacks subselects which forces you to do extra code, it lacks true
> foreign keys which means you need to add extra code to check data
> integrity.
>
> People use MYSql because it's so widely available, just like people use
> Windows.

I would definately agree with the points about psotgresql having better
functionallity, but it doesn't solely come down to availablility.

MySQL is a simpler RDBMS.. this doesn't mean it is strictly "worse" than
postgresql. In comes to one of those fundamental questions in IT... best
tool for the job. What MySQl is good at is handling small (in both byte and
row sense) tables which are frequently accessed, eg user authenitcatino. At
the other extreme are the big boys of DB2, Oracle etc which can handle an
awful lot and cope which much more complex structures and heavy usage.
postgresql, IMHO, is a few steps from the MySQL extreme towards DB2. What I
basically mean is that postgre has some features and functionallity which
make it more suited to some tasks, and mysql has a place too.



>
>
> >
> > /* Chris Lambert, CTO - [EMAIL PROTECTED]
> > WhiteCrown Networks - More Than White Hats
> > Web Application Security - www.whitecrown.net
> > */
> >
>
> > |
> > |
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] MySQL substrings?

2001-08-19 Thread Tom Carter

You can achieve the same effect by using left and right
- Original Message -
From: "Seb Frost" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, August 19, 2001 3:12 PM
Subject: [PHP] MySQL substrings?


> This is thew sort of thing I want:
>
> SELECT * FROM table ORDER BY substr(field,5,6)
>
> but I don't know the correct function, if there is one, or how to
implement
> it.
>
> cheers,
>
> - seb
>
> -Original Message-
> From: Michael [mailto:[EMAIL PROTECTED]]
> Sent: 19 August 2001 12:51
> To: [EMAIL PROTECTED]
> Subject: [PHP] Re: transaction
>
>
> Nafiseh Saberi wrote:
> >
> > hi.
> > in large database with php,postgres
> > and when in each time come many request ,
> > how do we implement transactions??
>
> > nafiseh.
>
> If you are wanting to run several queries in the one script though the
> one transaction -
> you'll need to send a begin(as a query) and execute it - then to the
> same connection send all your other queries as normal, and follow it up
> with a commit.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] MySQL substrings?

2001-08-19 Thread Tom Carter

very hard obviously.. I've looked quite a bit before to no avail! I tried
guessing it, obviously stupidity prevailed

(note to self.. go back and use substring function instead)
- Original Message -
From: "Chris Lambert" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, August 19, 2001 3:48 PM
Subject: Re: [PHP] MySQL substrings?


> There is a SUBSTRING() function, its just hard to find with their search
> system.
>
> /* Chris Lambert, CTO - [EMAIL PROTECTED]
> WhiteCrown Networks - More Than White Hats
> Web Application Security - www.whitecrown.net
> */
>
> - Original Message -
> From: Tom Carter <[EMAIL PROTECTED]>
> To: Seb Frost <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Sunday, August 19, 2001 10:32 AM
> Subject: Re: [PHP] MySQL substrings?
>
>
> | You can achieve the same effect by using left and right
> | - Original Message -
> | From: "Seb Frost" <[EMAIL PROTECTED]>
> | To: <[EMAIL PROTECTED]>
> | Sent: Sunday, August 19, 2001 3:12 PM
> | Subject: [PHP] MySQL substrings?
> |
> |
> | > This is thew sort of thing I want:
> | >
> | > SELECT * FROM table ORDER BY substr(field,5,6)
> | >
> | > but I don't know the correct function, if there is one, or how to
> | implement
> | > it.
> | >
> | > cheers,
> | >
> | > - seb
> | >
> | > -Original Message-
> | > From: Michael [mailto:[EMAIL PROTECTED]]
> | > Sent: 19 August 2001 12:51
> | > To: [EMAIL PROTECTED]
> | > Subject: [PHP] Re: transaction
> | >
> | >
> | > Nafiseh Saberi wrote:
> | > >
> | > > hi.
> | > > in large database with php,postgres
> | > > and when in each time come many request ,
> | > > how do we implement transactions??
> | >
> | > > nafiseh.
> | >
> | > If you are wanting to run several queries in the one script though the
> | > one transaction -
> | > you'll need to send a begin(as a query) and execute it - then to the
> | > same connection send all your other queries as normal, and follow it
up
> | > with a commit.
> | >
> | > --
> | > PHP General Mailing List (http://www.php.net/)
> | > To unsubscribe, e-mail: [EMAIL PROTECTED]
> | > For additional commands, e-mail: [EMAIL PROTECTED]
> | > To contact the list administrators, e-mail:
[EMAIL PROTECTED]
> | >
> | >
> | > --
> | > PHP General Mailing List (http://www.php.net/)
> | > To unsubscribe, e-mail: [EMAIL PROTECTED]
> | > For additional commands, e-mail: [EMAIL PROTECTED]
> | > To contact the list administrators, e-mail:
[EMAIL PROTECTED]
> | >
> |
> |
> | --
> | PHP General Mailing List (http://www.php.net/)
> | To unsubscribe, e-mail: [EMAIL PROTECTED]
> | For additional commands, e-mail: [EMAIL PROTECTED]
> | To contact the list administrators, e-mail: [EMAIL PROTECTED]
> |
> |
> |
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] class variables and methods

2001-08-19 Thread Tom Carter

There is a distinct chance of many difference schools of thought... my
background is Java (mostly at IBM.. so of course could be very different)..
but all the java gurus I've known have worked on the principle private
variable and public methods.. declaring all variables (except constants..
php doesn't really have a comparably concept) as private and always using
methods.

I would be very interested to hear others opinion on this...


>
> But when designing classes, isn't it normal to have private and public
> variables or properties.  Granted my OOP experience is very limited,
having
> access to OOP development in CA-Visual Objects, Clipper, VB, and ASP.  But
> it was normal to have a series of public properties one could access
> directly and then properties that could only be access by the class
itself.
> Of course in VB and ASP these were defined with Get, Let and Set methods,
> but you could still access them directly.  You could also design
properties
> that were read only as well.  Perhaps this is because of operator
> overloading??
>
> > -Original Message-
> > From: Tom Carter [mailto:[EMAIL PROTECTED]]
> > Sent: Sunday, August 19, 2001 2:19 AM
> > To: Andrew Libby; Joe Sheble (Wizaerd)
> > Cc: General PHP List
> > Subject: Re: [PHP] class variables and methods
> >
> >
> > There was a long discussion on this in a java forum I am part of, the
> > product of which was basically this...
> >
> > 1. All variables in a class are best left to be private (not sure PHP
has
> > this, but the programmer can work the principle in mind.. that is only
the
> > class can access them).
> > 2. Generic variable access/store methods should be avoided - the
principle
> > is that the internal variable can change name etc. without the external
> > interface having to worry about it.
> > 3. Method to set/fetch each variable - it may seem a counter intuitive
way
> > of doing it, especially when it is possible to do something
> > "nice" like the
> > set method below. This seems a very "un-web" way.. and this is where a
> > difference comes in. Web is not inherently OO, and a lot of the
> > practices of
> > web programmers are at conflict with more "traditional" apps
programmers.
> > Web tends to go for speed and simplicity, rather than good design etc.
> > 4. Some situations could theoretically arise where it is
> > necessary to set an
> > unknown amount of variables within a class, however it would be far more
> > sensible to put these into an array.
> >
> > In summary, in good OOP you should have a method for every
> > get/set operation
> > on variables that is required, using arrays as appropiate.
> >
> > Going back to the original point on whether or not to access the
variable
> > directly or build a set function in, they are both as bad as each other,
> > just about. They both access variables directly and require the outside
> > program to have knowledge of variable names etc. and it doesn't allow
for
> > checking for "correct" values being set ( a useful thin with the above
> > method)
> >
> > Hope this helps, let me know if I can provide any more advice.
> >
> > Tom
> >
> > - Original Message -
> > From: "Andrew Libby" <[EMAIL PROTECTED]>
> > To: "Joe Sheble (Wizaerd)" <[EMAIL PROTECTED]>
> > Cc: "General PHP List" <[EMAIL PROTECTED]>
> > Sent: Sunday, August 19, 2001 3:34 AM
> > Subject: Re: [PHP] class variables and methods
> >
> >
> > > Joe,
> > > There are varying opinions on this issue.  The argument for
> > > methods is that it hides the internal structure of your class.  This
> > > is always a good thing.  This means that the internals of the class
> > > can be changed, but the user interface (the user is the programmer
here)
> > > does not change.  So this alternative implementation of someclass
> > >
> > >
> > > class someclass
> >
> > > var $data = false;
> > >
> > > function set($key,$val) {
> > > $this->data[$key] = $val;
> > > }
> > > }
> > >
> > > is no different the the calling code.  In general, I tend to have an
> > > accessor/mutator method for each 'property' that I would like to
> > > provide access to.  I'd have a method for each $key that I want to
> > > support (this may not apply in your case).
> > >
> > > class someclass
> >
> > > var $name = false;
> >

Re: [PHP] Re: Shuffle Cards Function

2001-08-19 Thread Tom Carter

I could be wrong in thinking this, but wasn't the purpose of the presented
function to shuffle a deck in a deliberately imperfecatly random way? ie.
mimicking a human shuffler beats why one would want to do this as an
academic excersize, but hey, I like it ;-)
- Original Message -
From: "Richard Lynch" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, August 19, 2001 9:45 PM
Subject: [PHP] Re: Shuffle Cards Function


> http://php.net/shuffle will be much faster and just as random...
>
> --
> WARNING [EMAIL PROTECTED] address is an endangered species -- Use
> [EMAIL PROTECTED]
> Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
> Volunteer a little time: http://chatmusic.com/volunteer.htm
> - Original Message -
> From: Robert Schultz <[EMAIL PROTECTED]>
> Newsgroups: php.general
> To: <[EMAIL PROTECTED]>
> Sent: Saturday, August 18, 2001 11:37 PM
> Subject: Shuffle Cards Function
>
>
> > I've written a ShuffleCards function that will actually shuffle a deck
of
> > cards just like would happen in real life (divide the deck in half and
> stick
> > them into each other with 1-3 cards between each other card)
> >
> >function ShuffleCards(&$cardsArray, $times)
> >{
> > // Randomizes where to split within center (-3 to +3 from dead
center)
> > (MINIMUM 10 CARDS IN DECK)
> > // Splits into two array. Randomizes how many cards from left and
how
> > many cards from right (between 1 and 3)
> > // Alternates sides. Continues until both arrays are empty.
> > $arraySize = count($cardsArray);
> >
> > if($arraySize<10)
> >  return;
> >
> > $deadCenter = $arraySize/2;
> >
> > for($i=0;$i<$times;$i++)
> > {
> >  reset($cardsArray);
> >
> >  $cutVariant = rand(-3, 3);
> >  $cutLocation = $deadCenter+$cutVariant;
> >
> >  $firstArray = array();
> >  $secondArray = array();
> >
> >  for($z=0;$z<$arraySize;$z++)
> >  {
> >   if($z<$cutLocation)
> >array_push($firstArray, $cardsArray[$z]);
> >   else
> >array_push($secondArray, $cardsArray[$z]);
> >  }
> >
> >  $bottomFirst = rand(0, 1);
> >  $cardsArray = array();
> >
> >  while(count($firstArray) && count($secondArray))
> >  {
> >   $leftNewCards = array();
> >   $rightNewCards = array();
> >
> >   $leftVariant = rand(1, 3);
> >   if($leftVariant>count($firstArray))
> >$leftVariant = count($firstArray);
> >
> >   $rightVariant = rand(1, 3);
> >   if($rightVariant>count($secondArray))
> >$rightVariant = count($secondArray);
> >
> >
> >   for($x=0;$x<$leftVariant;$x++)
> >   {
> >array_push($leftNewCards, array_shift($firstArray));
> >   }
> >
> >   for($y=0;$y<$rightVariant;$y++)
> >   {
> >array_push($rightNewCards, array_shift($secondArray));
> >   }
> >
> >   if($bottomFirst==0)
> >   {
> >$newCardsArray = array_merge($leftNewCards, $rightNewCards);
> >$bottomFirst = 1;
> >   }
> >   else
> >   {
> >$newCardsArray = array_merge($rightNewCards, $leftNewCards);
> >$bottomFirst = 0;
> >   }
> >
> >   reset($newCardsArray);
> >
> >   while(count($newCardsArray))
> >   {
> >array_push($cardsArray, array_shift($newCardsArray));
> >   }
> >  }
> >
> >  if(count($firstArray))
> >  {
> >   while(count($firstArray))
> >array_push($cardsArray, array_shift($firstArray));
> >  }
> >  if(count($secondArray))
> >  {
> >   while(count($secondArray))
> >array_push($cardsArray, array_shift($secondArray));
> >  }
> > }
> >}
> >
> > Robert Schultz - [EMAIL PROTECTED]
> >
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Countries and ip addresses

2001-08-20 Thread Tom Carter

It's not possible to be assured of doing this properly for the following
reason..

1. not all hosts translate to IP address
2. Soem host names are often meaningless (eg .com)

The way to do it is basically this
1. use gethostbyaddr() (http://www.php.net/gethostbyaddr) to do a reverse
DNS from IP to host name
2. use a regex to match everything to the right of the last .
3. Look that value up in some table of countries eg.
notam.uio.no
to no
to norway

HTH, Tom
- Original Message -
From: "Mihailo Dzigurski" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 20, 2001 9:57 AM
Subject: [PHP] Countries and ip addresses


> Hello,
>
> How can I find out from witch country user is based on user ip address? I
> need this from php script.
>
> Thanks,
> Mihailo.
>
>
> _
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Shell version of php

2001-08-23 Thread Tom Carter

Hi guys,

This arose trying to install php-egg, altho thats not what this msg is
really about.  For it to run I need to have "a shell version" running...
what exactly is this and how do I go about installing it?
I have php installed (I think) as a module.. and by my understanding this
is necessary for certain functions to run can I have both co-existing?
I guess what I want is a copy of php running completely separate to
apache, ie as a standalone app. any help much appreciated!!!

Tom Carter


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] how to connect to php from vb

2001-09-05 Thread Tom Carter

php can act as a server in many respects, it can handle sockets, some
streams etc. so the the answer is yes, you can connect to it from
anything. (for instance I'm currently building a plugin to Lightwave that
connects to php)... programs commonly use http to connect (it's simple then
designing your own protocol in most cases... eg yahoo messenger).

The question is much more a VB question.. I know VB can connect to the web,
couldn't tell you how tho, try asking in a vb forum. If writing in a normal
programming language there is libwww from w3c (w3.org) that can do it all
for you (this is what we use)


- Original Message -
From: "sagar" <[EMAIL PROTECTED]>
To: "php" <[EMAIL PROTECTED]>
Sent: Wednesday, September 05, 2001 5:19 PM
Subject: [PHP] how to connect to php from vb


hi,

can i connect to php from a vb appliation.
should this be asked elsewhere (if so pl
let me know)

/sagar




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Determining IP address

2001-09-06 Thread Tom Carter

Just to bring that point up again for those in the know, IP addresses
are easy to spoof, in other words make it appear that it comes from
elsewhere. If your system contains sensitive or confidential data then I
would suggest you do both - username/password and IP

Do you have an intranet/secure internal network?

Tom
> > I was wondering if there is a way in PHP that you can determine the IP
> > address?  I am wondering because I am developing a simple web based
> > program (in php) for use in a hospital setting and I want to do some
> > checks to make sure that the program is not being run from a computer
> > outside of the hospital.  Instead of having user names and
> > passwords, I thought it would be eaiser if I just checked the IP
> > address, especially since this is not a program that really has to
> > be secure, but I would like to prevent just anyone from using it. Is
> > this possible with php?
>
> You can use $REMOTE_ADDR to find the IP address of the machine
> accessing the script.
>
> It could be spoofed, though.
>
> Jason
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Web based POP mail client

2001-09-06 Thread Tom Carter

Hi All,

I've found a plethora of scripts to do web based email, but the quality
seems to vary greatly. I'm looking for something which gives a
mail2web/hotmail/yahoo style interface to a pop mail account but is written
in such a way that I can easily extend and integrate it into my iste (I've
seen a couple where the code is amazingly messy)

Does anyone have any experience of any of the scripts available they could
share?

Thanks in advance,

Tom Carter



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Whacky WGET issue...

2001-09-06 Thread Tom Carter

A much better way of doing this would be use to mod_rewrite. an apache
module that basically applies regular expressions to urls

This would give you a way of avoiding passing variable but without resorting
to the work around of 404

- Original Message -
From: "Sondra Russell" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 30, 2001 6:27 PM
Subject: [PHP] Whacky WGET issue...


> Hello everyone!
>
> Crazy question:
>
> I've created a little script that reads in .txt files and, with the
> help of phplib templates, matches them up with a collection of
> templates and spits out the beautiful html page.
>
> In order to avoid sending variables through the URL I've stolen this
> bizarre workaround where, when you call
> http://www.mysite.com/somepage.html for example, the apache
> configuration realizes it's a 404 and redirects all 404s through my
> cms script.  Then my script looks for
> http://www.mysite.com/somepage.txt and does the rest.
>
> This works beautifully, and my plan was to have a "dev" environment
> that runs against the little CMS system and then wget the whole site
> periodically for the live server (so, the live site actually *is* a
> collection of flat pages).
>
> Beautiful plan, but it turns out that WGET doesn't see the apache
> configuration change that runs all 404s through my CMS script.  It
> sees a 404 and tells me its a 404 and then goes back to its coffee
> break, you know?
>
> Anyone else tried this workaround before with similar results?
> Anyone else have a better workaround?  Bueller?
>
> Anyway, best,
> Sondra
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP Stress Testing.

2001-09-06 Thread Tom Carter

I agree with the point about the spec of machine... a lot of comparisons are
made using machine where the spec of the machine ends up being the
bottleneck.
Also, PHP is more tolerant then say JSP in the code you write, it is
possible to write some really bad php apps which work albeit very
ineffeciantly and by the same token some very good php apps.

Would definately be interested in doing some performance measurements.


- Original Message -
From: "Andy Woolley" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, September 04, 2001 2:57 PM
Subject: [PHP] PHP Stress Testing.


> Guys,
>
> Has anyone ever tested PHP, MySQL on Apache to see just how well it will
> work when put under serious pressure.
>
> Seems that people all over the world are saying how PHP doesnt cut it when
> pushed to the limit, question is what is the limit?
>
> Anyone interested in setting up a stress test, to try and prove how good
PHP
> really is.
>
> Andy.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Netscape & Cookies

2001-09-07 Thread Tom Carter

then it should probably be
SetCookie("bilderanzeige","\"$bilderanzeige\"",time()+3600*24*30,"/","",0);
as a general rule, only numerics can get away without being surrounded in
quotes

- Original Message -
From: "Jochen Kaechelin" <[EMAIL PROTECTED]>
To: "PHP General List" <[EMAIL PROTECTED]>
Sent: Friday, September 07, 2001 2:43 AM
Subject: RE: [PHP] Netscape & Cookies


> >
> SetCookie("bilderanzeige",$bilderanzeige,time()+3600*24*30,"/","",0);
> > > Works fine in IE and Opera!
> > > Could anyone help, please!
> >
> > What's in $bilderanzeige?
>
>
> $bilderanzeige = "ja" or
> $bilderanzeige = "nein"
>
> Jochen
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Sending Broadcast Email - will a large loop cause a crash?

2001-09-07 Thread Tom Carter

Also remember PHP has a maximum execution time (normally 30 seconds) so you
will need to overwrite when running the script.

- Original Message -
From: "Kath" <[EMAIL PROTECTED]>
To: "Fotwun" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, September 07, 2001 12:39 AM
Subject: Re: [PHP] Sending Broadcast Email - will a large loop cause a
crash?


> Whats your time frame for deployment of the email?
>
> You might want to stagnate it out... like loop through 100, pause for 10
> secs, do the next 100, pause, repeat.  Maybe longer if you could.
>
> You could always have it record the number, stop it and adjust
higher/lower
> as required.
>
> Also, make sure that you are able to tell what emails are kicked back and
> logged as not being received (User not found, other kind of error in
> sending).
>
> Please let us know what happens, it would be excellent reference.
>
> - k
>
> - Original Message -
> From: "Fotwun" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, September 06, 2001 7:16 PM
> Subject: [PHP] Sending Broadcast Email - will a large loop cause a crash?
>
>
> > Hi,
> >
> > I need to send a broadcast email to our customers (about 3,000 emails).
> The
> > data is being drawn for the DB, and will be personalized. Obviously, the
> > code to do this is only a few lines. However, I am concerned with the
load
> > it will put on the system trying to loop through and mail() 3,000+
times.
> > Because of the overhead I anticipate this will cause the server, I am
> > planning to do it late in the evening.
> >
> > My concern is this... will such a loop calling mail() cause
PHP/Apache/the
> > box/etc to crash under normal circumstances? We have a pretty beefy box,
I
> > just have never tried broadcasting through PHP. Also, if there is any
> > reasonable chance for such a failure, is it possible to put timed pauses
> in,
> > say half a second or so before it continues the loop. I've never heard
of
> > inserting pauses into the execution of PHP code, not sure if its
possible.
> > If it were, I would think this could combat some of the load, and
prevent
> > the bottleneck from building backlog until failure.
> >
> > Who knows, maybe this type of routine won't even make my box flinch
> (P3-833,
> > FreeBSD, 256 megs), that's why I'm asking ahead of time. I'd hate to see
a
> > crash, mainly because I'll have no idea where it left off, and will end
up
> > sending 2 or more emails to some people if I have to run it more than
> once.
> >
> > Thanks.
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] ordering a query

2001-09-07 Thread Tom Carter

Just to expand slightly on this answer...
think back to days at school, you order works as so aardvark, abbey,
accoustic, ie you compare rightmost letters, if they match then compare the
next letter along until you find a difference... this is what your sort is
doing. It doesn't think 1 and 10 are the same, it compares the first digit,
sees they are the same and postitions based on the second digit.

As george correctly says changing the column type to INT will make sure the
RDBMS orders them numerically rather than alphabetically

Tom, a rambler
- Original Message -
From: "George Pitcher" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, September 07, 2001 9:00 AM
Subject: Re: [PHP] ordering a query


> It is simply ordering them as type data rather than as type integer.
Change
> your data type in the db.
>
> George, a newbie
> - Original Message -
> From: <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, September 07, 2001 9:16 AM
> Subject: [PHP] ordering a query
>
>
> Me again :)
>
> I have a query that orders by id#, the problem is I have 17 items and I
get
> an output like so: 1,10,11,12,13,14,15,16,17,2,3,4,5,6,7,8,9
>
> So it thinks 1 and 10 are the same, and it thinks 11 is less than 2 and so
> on and so forth. Remedy please? (I'd rather not rename the items 01, 02,
03,
> 04, etc.)
>
> Thanks again.
>
> Nate
>
>
>
> _
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Warning - how serious, how to eliminate

2001-09-07 Thread Tom Carter

ichange that line to

if($weight[$i]) $percentage[$i] = $totaal[$i] / $weight[$i];

All tho this does mean that if $weight[$i] is zero then $percentage will be
as well

HTH, Tom
- Original Message -
From: "Bart Verbeek" <[EMAIL PROTECTED]>
To: "Php-General" <[EMAIL PROTECTED]>
Sent: Friday, September 07, 2001 11:36 AM
Subject: [PHP] Warning - how serious, how to eliminate


> Hello people,
>
> I've got a question regarding the follwing scripts that gives an error.
> When I execute the scripts below I get an warning-message:
>
> - Warning: Division by zero in ./scripts/fasen_include.php on line 47...
>
> This is the script I use.
> When the vars are set the value has to be added to $totaal and $weight,
when
> not the var has to be skipped.
> At the end of the scripts $totaal is devided by $weight to get an average
> ($percentage).
> What can I do to eliminate the warning and is it serious?
> Regards,
>
> Bart
>
> #BEGIN PHP-SCRIPTS
>   for (;;$fase[$i]) {
> $weight[$i] = '';
> $totaal[$i] = '';
>
>   if (isset($fase[$i][f_d1_perc]) && !empty($fase[$i][f_d1_perc])) {
> if (isset($fase[$i][f_d1_weight]) && !empty($fase[$i][f_d1_weight])){
> $weight[$i] += $fase[$i][f_d1_weight];
> $totaal[$i] += ($fase[$i][f_d1_weight] * $fase[$i][f_d1_perc]);
>  }
>  }
>   if (isset($fase[$i][f_d2_perc]) && !empty($fase[$i][f_d2_perc])) {
> if (isset($fase[$i][f_d2_weight]) && !empty($fase[$i][f_d2_weight])){
> $weight[$i] += $fase[$i][f_d2_weight];
> $totaal[$i] += ($fase[$i][f_d2_weight] * $fase[$i][f_d2_perc]);
>  }
>  }
>   if (isset($fase[$i][f_d3_perc]) && !empty($fase[$i][f_d3_perc])) {
> if (isset($fase[$i][f_d3_weight]) && !empty($fase[$i][f_d3_weight])){
> $weight[$i] += $fase[$i][f_d3_weight];
> $totaal[$i] += ($fase[$i][f_d3_weight] * $fase[$i][f_d3_perc]);
>  }
>  }
>   if (isset($fase[$i][f_d4_perc]) && !empty($fase[$i][f_d4_perc])) {
> if (isset($fase[$i][f_d4_weight]) && !empty($fase[$i][f_d4_weight])){
> $weight[$i] += $fase[$i][f_d4_weight];
> $totaal[$i] += ($fase[$i][f_d4_weight] * $fase[$i][f_d4_perc]);
>  }
>  }
>   if (isset($fase[$i][f_d5_perc]) && !empty($fase[$i][f_d5_perc])) {
> if (isset($fase[$i][f_d5_weight]) && !empty($fase[$i][f_d5_weight])){
> $weight[$i] += $fase[$i][f_d5_weight];
> $totaal[$i] += ($fase[$i][f_d5_weight] * $fase[$i][f_d5_perc]);
>  }
>  }
>   $percentage[$i] = $totaal[$i] / $weight[$i];
>   $percentage[$i] = number_format($percentage[$i],1, ',', ' ');
> #END PHP-SCRIPTS
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] code troble

2001-09-07 Thread Tom Carter

You also seem to be missing a closing }. please check all braces before
posting to a list...
- Original Message -
From: "Nikola Veber" <[EMAIL PROTECTED]>
To: "php forum" <[EMAIL PROTECTED]>
Sent: Friday, September 07, 2001 1:29 PM
Subject: [PHP] code troble


> Hi
> I'm having trobles with this code. Can you take a look at it?
> Parse error:  parse error in C:/XITAMI/webpages/index.php on line 34 is
the
> error msg.
>
> thanx
>
> 
> 
> Example 2.01
> 
> 
> 
>  if (emty(provera)) {pokazi();}
> else {obrada();}
> ?>
>  function pokazi() {
> global $PHP_SELF;
> ?>
> 
> 
>   
>  }
> ?>
>  function obrada() {
> global $ime;
> global $vrednost;
> if ($ime == "Nikola" && $vrednost == 100){
> echo "Zdravo $ime ";
> echo "Iznos na Vasem racunu je $vrednost dolara";
> }
> ?>
> 
> 
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Fw: [PHP] Re: Suggesting a file name.

2001-09-07 Thread Tom Carter

This really doesn't work well to say the least... I've had endless problems
with it, and basically just using headers there is no great way to to it.

The best solution I found is to use the mod_rewrite module in apache to map
a url onto the script.

- Original Message -
From: "Franklin van Velthuizen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, September 07, 2001 4:02 PM
Subject: [PHP] Re: Suggesting a file name.


>
> "Theodore Brinkman" <[EMAIL PROTECTED]> wrote in
> message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > I wrote a small script to generate an image file containing a version
> number
> > for use in some web apps we are coding at work.  The problem is, that
with
> > an up-to-date version of IE, the image shows up and can only be saved as
a
> > BMP.  Older versions don't display it, but prompt for download and save
it
> > correctly.  No problems in Mozilla (or presumably in Netscape 4.7x
> either).
> >
>
> Try:
> header("Content-Disposition: filename=$filename");
>
> / Franklin
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: newbie looking to sync access with MySQL

2001-09-07 Thread Tom Carter

Thanks for that helpful email george, it's something I've been looking at as
well.

In a situation I'm tackling now I've rewritten the core part of the access
such that it is dependant upon data recieved from the server, rather than
the server being dependant upon data from access. So far it appears to be
working much better, but I would be interested to know your opinions.

Tom
- Original Message -
From: "George Whiffen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, September 07, 2001 5:10 PM
Subject: [PHP] Re: newbie looking to sync access with MySQL


> Tom,
>
> Every man and his dog seems to have an Access database they want to view
> on the web.
>
> What I usually do for them is :
>
> a) Tell them to save the data from Access as a text file, comma separated.
(It's
> a standard Access option).
>
> b) Give them a web page where they can upload it, ( discussed in the php manual).
>
> c) Parse the file using parsecsv and store away the bits you want in
MySQL.  If you
> get them to leave the field names on the first line of the file (another
standard
> Access option), you can do a quick check that all the fields are there and
in
> the expected place, before you put the data into MySQL.
>
> d) Serve the web pages from MySQL.
>
> e) You may still need your Web Data Administration.  There's often missing
data
> that you need for sensible web pages e.g. categories, more user friendly
descriptions
> of codes etc.
>
>
> >From the customer's point of view the uploads are a manual exercise which
doesn't sound
> very sexy, and it would probably take them 3-4 minutes every time.
> The good thing is that it's all pretty easy, and they should be able to
get their
> most junior member of staff to do it.  They also get the comfort of
knowing if anything
> went wrong.
>
> If that's not acceptable, it's more tricky.  In principle you could use an
> ODBC interface to their Access database to establish a live connection to
it
> and suck up the data that way, but it's fiddly and much less reliable than
> a boring old upload.
>
> Another option would be to execute the extract and transfer of the data
via a batch
> job running on their platform.  But, personally, I would hate to have to
support
> that kind of activity.
>
> The bottom line as far as I'm concerned is that if they insist on holding
important
> information on a MS platform, they can expect a) not to have a seamless
operation,
> b) to have to watch out for problems themselves!  Once they see how easy
an extract/upload
> is they probably won't mind anyway.
>
> Tom Beidler wrote:
> >
> > I have a potential customer that just called and would like to create a
web
> > site that would display secure info for their clients. Currently his
> > employees are using a flat Access database to add, edit and delete
records
> > and he would like to keep it that way.
> >
> > Normally I would create a web manager for them to add, edit and delete
the
> > MySQL database. Is there an easy, reliable way to sync up Access with
MySQL.
> > Maybe a nightly script that could upload the contents of Access to
MySQL.
> >
> > Would it be easier to start with ASP and SQL Server?
> >
> > Thanks,
> > Tom
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] URLencode

2001-09-07 Thread Tom Carter

Simplest way is to do this

$string = "my string";
$string=urlencode(str_replace(" ","+",$string));

ie use str_replace to manually replace spaces with +, urlencode then won't
do anything further to it

- Original Message -
From: "Brandon Orther" <[EMAIL PROTECTED]>
To: "PHP User Group" <[EMAIL PROTECTED]>
Sent: Friday, September 07, 2001 11:05 PM
Subject: RE: [PHP] URLencode


> I just realized that on the server I am trying to run this on, URLEncode
> is working like rawurlencode.   Does anyone have any idea why this might
> be happening?
>
> Thank you,
>
> 
> Brandon Orther
> WebIntellects Design/Development Manager
> [EMAIL PROTECTED]
> 800-994-6364
> www.webintellects.com
> 
>
> -Original Message-
> From: Brandon Orther [mailto:[EMAIL PROTECTED]]
> Sent: Friday, September 07, 2001 2:41 PM
> To: PHP User Group
> Subject: [PHP] URLencode
>
> Hello,
>
> I am working on a script and using urlencode but not getting the results
> I want.  Does anyone know how to convert the spaces of a sting of text
> in "+" instead of %20?
>
> Thanks
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] difference between

2001-09-09 Thread Tom Carter

The problem comes if you use php to generate xml documents in xml you
use the tag 
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Sunday, September 09, 2001 8:05 PM
Subject: RE: [PHP] difference between 
> There isn't any difference, if your php.ini settings allow it
> (short_tags, I believe), you can use 
>
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, September 09, 2001 2:43 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] difference between 
>
> Hi,
>
> I am a newbie at this PHP thing and I have been working from information
> on the web and from books.
>
> I noticed that some start the PHP script with   book uses both methods interchangeably.
>
> Is there a real difference between the two?
>
> Or maybe I just haven't noticed something.
>
> Peter
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED] To
> contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] HTTP POST..

2001-09-10 Thread Tom Carter

PHP is probably compiled as a module.. if you want to be able to compile php
to use on command line you need to compile a second version (yes you can
have two) without all the apache configure options (ie only things like
mysql as and when needed)

- Original Message -
From: "ReDucTor" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, September 10, 2001 5:26 PM
Subject: [PHP] HTTP POST..


> Ok,
>Let me explain my situation...
>
>   I am trying to make an autoresponder, I want to make it in PHP, I am
using
> qmail, so in PHP what i was hoping to do was read STDIN, and put in my
> .qmail the path to php, then the script, but I don't know where php is
> located on the server(not my server, i've tried the common paths, they
don't
> respond to emails), so now what i have done is made a perl script, that
go's
> to the url of the php script, but it doesn't appear to work reading stdin
> from there, so now what i am wanting to do is capture stdin in the perl
> script, then POST it into the PHP script...here is what I have in the perl
> script so far...
>
> #!/usr/bin/perl
> use IO::Socket;
> $host = "www.domain.com";
> $EOL = "\015\012";
> $BLANK = $EOL x 2;
> $document = "autoresponder.php";
> $remote = IO::Socket::INET->new( Proto => "tcp",
>  PeerAddr  => $host,
>  PeerPort  => "http(80)",
> );
> $remote->autoflush(1);
> print $remote "GET http://$host/$document HTTP/1.1". $EOL;
> print $remote "HOST: ". $host. $BLANK;
> while ( <$remote> ) {  }
> close $remote;
>
> BTW I have been looking at RFC 2616 informatino, but Havn't managed to
find
> anything...
>
>  - James "ReDucTor" Mitchell
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] displaing news

2001-09-12 Thread Tom Carter

rough outline of what you would need to do.

this is pseudocode.. I'm too tired to write correct php :)

$is_first=true;
whlie(get next result entry) {
if($is_first) {
$last-date=date of this entry;
$this-date=date of this entry;
$is_first=false;
}

if($this-date==$last-date) {
just put the article after the current one
} else {
start a new section, displaying date etc
}

$last-date=$this-date;
}

- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 12, 2001 5:24 PM
Subject: [PHP] displaing news


Hey all!

I have a slight problem I was hoping you could help me with. I wrote earlier
but no response (so one last try). I'm writing a little news script for my
site, and well here is the scenario:

The SHORT:

I have news,headline,author,date,time,etc. all in a table in a mysql db,
that I use mysql_fetch_array to pull out of the db and display on a page. It
shows everything fine, but I was wondering, if there is more than one news
entry per day, how can I display 1 date above the news entries for that day.
(Instead of a seperate date for each news entry).


The LONG:

I have 2 tables in a mysql database, one holds author information (name,
email, password, etc.)
The other table holds the news that they submit (news, date, time, headline,
etc.)

Now I am trying to display the news on a page, ordered of course by date (or
id in this case) and well i'm using the code below.

" .
$myrow["headline"] . "
Posted by mailto:"; .
$myrow["email"] . ">" .

$myrow["author"] . " at " . $myrow["time"] . $myrow["$tod"] .
"" . $myrow["news"] .

"";
}
?>

So the results would look something like:

$Headline
Posted by $author at $time

$news

and it would of course just repeat, for however many entries there is.

Now the problem:
If I enter 4 news posts a day, I want to show 1 date above all the news
posts. (Instead of 1 date next to each news post) Any idea how I can do this
(In easy to understand lingo/code please)?


Thanks!

Nate




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] displaing news

2001-09-12 Thread Tom Carter

first (quick) glance looks fine... what error are you getting?

you didn't specify username/password for your mysql connection. you may
be required to do that..


- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 12, 2001 6:12 PM
Subject: Re: [PHP] displaing news


> Thanks Tom,
>
> I'm still a newbie at this stuff though, so can you (or anyone) look this
> over and tell me what I did wrong...
>
>  //Connect to db
> $db = mysql_pconnect("localhost");
> mysql_select_db("news",$db);
>
> $result1 = mysql_query("SELECT * FROM news,authors ORDER BY `id`
DESC",$db);
>
> $is_first=true;
> while($myrow=mysql_fetch_array($result1)) {
> if($is_first) {
> $lastdate=$myrow["date"];
> $thisdate=$myrow["date"];
> $is_first=false;
> }
>
> if($thisdate==$lastdate) {
>
> echo "text here" . $myrow["headline"] . "Posted by mailto:";
> . $myrow["email"] . ">" .
> $myrow["author"] . " at " . $myrow["time"] . $myrow["$tod"] .
""
> . $myrow["news"] .
>
> "";
> } else {
> echo "" . $myrow["date"] . "text here" . $myrow["headline"] .
> "Posted by mailto:"; . $myrow["email"] . ">" . $myrow["author"] .
> " at " . $myrow["time"] . $myrow["$tod"] . "" . $myrow["news"]
.
>
> "";
> }
>
> $lastdate=$thisdate;
> }
> ?>
>
> I wasn't sure how to assign the $lastdate and $thisdate variables.
>
>
>
> - Original Message -
> From: "Tom Carter" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Wednesday, September 12, 2001 9:37 AM
> Subject: Re: [PHP] displaing news
>
>
> > rough outline of what you would need to do.
> >
> > this is pseudocode.. I'm too tired to write correct php :)
> >
> > $is_first=true;
> > whlie(get next result entry) {
> > if($is_first) {
> > $last-date=date of this entry;
> > $this-date=date of this entry;
> > $is_first=false;
> > }
> >
> > if($this-date==$last-date) {
> > just put the article after the current one
> > } else {
> > start a new section, displaying date etc
> > }
> >
> > $last-date=$this-date;
> > }
> >
> > - Original Message -
> > From: <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Wednesday, September 12, 2001 5:24 PM
> > Subject: [PHP] displaing news
> >
> >
> > Hey all!
> >
> > I have a slight problem I was hoping you could help me with. I wrote
> earlier
> > but no response (so one last try). I'm writing a little news script for
my
> > site, and well here is the scenario:
> >
> > The SHORT:
> >
> > I have news,headline,author,date,time,etc. all in a table in a mysql db,
> > that I use mysql_fetch_array to pull out of the db and display on a
page.
> It
> > shows everything fine, but I was wondering, if there is more than one
news
> > entry per day, how can I display 1 date above the news entries for that
> day.
> > (Instead of a seperate date for each news entry).
> >
> >
> > The LONG:
> >
> > I have 2 tables in a mysql database, one holds author information (name,
> > email, password, etc.)
> > The other table holds the news that they submit (news, date, time,
> headline,
> > etc.)
> >
> > Now I am trying to display the news on a page, ordered of course by date
> (or
> > id in this case) and well i'm using the code below.
> >
> >  >
> > $db = mysql_pconnect("localhost");
> > mysql_select_db("news",$db);
> >
> > $result1 = mysql_query("SELECT * FROM news,authors ORDER BY `id`
> DESC",$db);
> >
> > while($myrow=mysql_fetch_array($result1))
> > {
> > echo " > src=images/r13.gif> >
> > width=100%>" .
> > $myrow["headline"] . "
> > Posted by mailto:"; .
> > $myrow["email"] . ">" .
> >
> > $myrow["author"] . " at " . $myrow["time"] . $myrow["$tod"] .
> > " >
> > src=images/r15.gif> > FACE=verdana>" . $myrow["news"] .
> >
> > "";
> > }
> > ?>
> >
> > So the results would look something like:
> >
> > $Headline
> > Posted by $author at $time
> >
> > $news
> >
> > and it would of course just repeat, for however many entries there is.
> >
> > Now the problem:
> > If I enter 4 news posts a day, I want to show 1 date above all the news
> > posts. (Instead of 1 date next to each news post) Any idea how I can do
> this
> > (In easy to understand lingo/code please)?
> >
> >
> > Thanks!
> >
> > Nate
> >
> >
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] is PHP crazy, or am I?

2001-09-13 Thread Tom Carter

maybe I'm wrong, but don't you need a return value?

- Original Message -
From: "Christian Dechery" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, September 08, 2001 2:24 AM
Subject: [PHP] is PHP crazy, or am I?


> whats wrong with the code below?
>
> function bubblesort(&$vetor,$tam)
> {
> $trocou=true;
> $i=$j=0;
>
> while($trocou)
> {
> $trocou=false;
> for($j=0; $j<$tam-$i; $j++)
>   {
> if($vetor[$j] > $vetor[$j+1])
> {
> $aux=$vetor[$j];
> $vetor[$j]=$vetor[$j+1];
> $vetor[$j+1]=$aux;
> }
> $i++;
>   }
> }
> }
>
> it's right right?
> so why when I print the array (with a for(;;) or with print_r) it still
> shows me it's not ordered... I printed it INSIDE the function... what's
the
> thing here? I'm I nuts?
>
> p.s: meu novo email é [EMAIL PROTECTED]
> 
> . Christian Dechery (lemming)
> . http://www.tanamesa.com.br
> . Gaita-L Owner / Web Developer
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] SMS with php

2001-09-17 Thread Tom Carter

I'm very intruiged how you have got this to work it was my understanding
you needed to be running a server, such as kannel, and have a contract with
an smsc?

Is this so?

- Original Message -
From: "Lewis Bergman" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, September 17, 2001 2:59 AM
Subject: Re: [PHP] SMS with php


> > Hi,
> >
> > Does anyone know how to send a sms message to a handphone using PHP?
> >
> > Thanks and regards,
> > Alva Chew
> I have a class that does it. It is very easy. See the RFC on SNPP and some
> use standard mail servers.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] SMS with php

2001-09-17 Thread Tom Carter

Thats the standard, but because of the other systems involved in delivering
msgs then I don't think it possible just to do that without the co-operation
of a third party smsc.

I really hope I'm wrong tho...
- Original Message -
From: "nico_oreka" <[EMAIL PROTECTED]>
To: "Tom Carter" <[EMAIL PROTECTED]>; "Lewis Bergman"
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, September 17, 2001 11:00 AM
Subject: Re: [PHP] SMS with php


> http://www.ietf.org/rfc/rfc1568.txt?number=1568
>
> maybe something can be done with that 
>
>
> (°-Nayco,
> //\[EMAIL PROTECTED]
> v_/_ http://nayco.free.fr
>
>
> - Original Message -
> From: Tom Carter <[EMAIL PROTECTED]>
> To: Lewis Bergman <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Monday, September 17, 2001 10:51 AM
> Subject: Re: [PHP] SMS with php
>
>
> > I'm very intruiged how you have got this to work it was my
> understanding
> > you needed to be running a server, such as kannel, and have a contract
> with
> > an smsc?
> >
> > Is this so?
> >
> > - Original Message -
> > From: "Lewis Bergman" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Cc: <[EMAIL PROTECTED]>
> > Sent: Monday, September 17, 2001 2:59 AM
> > Subject: Re: [PHP] SMS with php
> >
> >
> > > > Hi,
> > > >
> > > > Does anyone know how to send a sms message to a handphone using PHP?
> > > >
> > > > Thanks and regards,
> > > > Alva Chew
> > > I have a class that does it. It is very easy. See the RFC on SNPP and
> some
> > > use standard mail servers.
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail:
[EMAIL PROTECTED]
> > >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] SMS with php

2001-09-17 Thread Tom Carter

for those who are interested there is a good wap/sms server, open source and
generally funky kannel (kannel.3glabs.org)

It's all you need to server wap, but sms does requrie a contract (=cost
money) with a service centre

- Original Message -
From: "Tom Carter" <[EMAIL PROTECTED]>
To: "nico_oreka" <[EMAIL PROTECTED]>; "Lewis Bergman"
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, September 17, 2001 11:07 AM
Subject: Re: [PHP] SMS with php


> Thats the standard, but because of the other systems involved in
delivering
> msgs then I don't think it possible just to do that without the
co-operation
> of a third party smsc.
>
> I really hope I'm wrong tho...
> - Original Message -
> From: "nico_oreka" <[EMAIL PROTECTED]>
> To: "Tom Carter" <[EMAIL PROTECTED]>; "Lewis Bergman"
> <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Monday, September 17, 2001 11:00 AM
> Subject: Re: [PHP] SMS with php
>
>
> > http://www.ietf.org/rfc/rfc1568.txt?number=1568
> >
> > maybe something can be done with that 
> >
> >
> > (°-Nayco,
> > //\[EMAIL PROTECTED]
> > v_/_ http://nayco.free.fr
> >
> >
> > - Original Message -
> > From: Tom Carter <[EMAIL PROTECTED]>
> > To: Lewis Bergman <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> > Cc: <[EMAIL PROTECTED]>
> > Sent: Monday, September 17, 2001 10:51 AM
> > Subject: Re: [PHP] SMS with php
> >
> >
> > > I'm very intruiged how you have got this to work it was my
> > understanding
> > > you needed to be running a server, such as kannel, and have a contract
> > with
> > > an smsc?
> > >
> > > Is this so?
> > >
> > > - Original Message -
> > > From: "Lewis Bergman" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Cc: <[EMAIL PROTECTED]>
> > > Sent: Monday, September 17, 2001 2:59 AM
> > > Subject: Re: [PHP] SMS with php
> > >
> > >
> > > > > Hi,
> > > > >
> > > > > Does anyone know how to send a sms message to a handphone using
PHP?
> > > > >
> > > > > Thanks and regards,
> > > > > Alva Chew
> > > > I have a class that does it. It is very easy. See the RFC on SNPP
and
> > some
> > > > use standard mail servers.
> > > >
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> > > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail:
[EMAIL PROTECTED]
> > >
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Code Speed & Optimization

2001-09-17 Thread Tom Carter

The question really for me is this...are they caches of results? in other
words, slightly old information? Or can they still be used in the same way
as a "raw" script and still be improved?

- Original Message -
From: "Andreas Gietl" <[EMAIL PROTECTED]>
To: "Alex Ranaldi" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Monday, September 17, 2001 6:22 PM
Subject: Re: [PHP] Code Speed & Optimization


> On Monday 17 September 2001 18:32, Alex Ranaldi wrote:
>
> i just gonna quote Yasuo Ohgaki  who posted this morning:
>
> There are sevral cache modules. These are cache modules that I know.
>   - Alternative PHP Cache (APC): http://apc.communityconnect.com/
>   - AfterBuaner Cache (bwcache) : http://bwcache.bware.it/
>   - PHP Accelerator : http://www.php-accelerator.co.uk/
>   - Zend Cache : http://www.zend.com/zend/products.php#cache
>
> All of them gives 2 - 3 times perfomance improvment in general.
>
> > Hello Everyone,
> >
> > My PHP-based website is beginning to get a bit slow. I'm wondering if
> > anyone knows of any specific code optimizations that can be done to
> > improve the general performance. I'm not running Zend Optimizer right
> > now but I have plans to install it soon, hopefully it'll help. If
> > anyone has any suggestions or knows of anything that can help, please
> > let me know.
> >
> > Thanks,
> > Alex
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]