Re: [PHP] Print current page with no printer dialog box - How ?

2001-09-18 Thread Chris Lambert

[EMAIL PROTECTED] (* RZe:) wrote in news:20010918101659.I17452@pro-
pain.telemediair.nl:

 
 Yep... that's what I said; You can't use pagebreaks. First...
 they're not part of HTML. Second; like you said yourself... it's not
 cross-platform... and like everyone knows; creating sites/pages that
 only some part of the users can see/use is not realy every very
 great solution. You build sites in order make as many people
 visit/use/see them as possible. Not just that one part of the world
 that uses the browser that you like.
 

However, using CSS to insert page breaks causes no problem at all in older 
browsers.  HTML (and related technologies) have been designed so that newer 
features do not cause problems on older clients.  Of course not everyone 
will use the newer features in such a way but that does not mean that they 
cannot be used correctly.  In theory a document written in XHTML should 
display (to some extent) on a text only browser which only supports HTML 1.

-- 
Chris Lambert
[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] Print current page with no printer dialog box - How ?

2001-09-18 Thread Chris Lambert

[EMAIL PROTECTED] (* RZe:) wrote in
[EMAIL PROTECTED]:">news:[EMAIL PROTECTED]: 

 FYI; pagebreaks are added CSS2. Not available in CSS1, so not
 compatible with older versions of browsers (opposite to what you
 say).

I know that.  I did not say it would work - I said it would not cause any 
problems.

 
 The browsers have been made backwards-compatible (mostly anyway),
 and not forwards-compatible (like you say). Pages made for the older
 browsers still work (usualy... not always) on the newer browsers.
 But pages made for newer browsers hardly ever work fine on older
 browsers.
 

The HTML specification says that clients/browsers should ignore any tags 
they don't understand.  Therefore any old browser coming across a 
STYLE=... will ignore it.  Pages made solely for newer browsers will 
probably look awful in older browsers.  However, web pages can be written 
that use the newer features of newer browsers (such as CSS, Javascript, 
DHTML, Tables!, etc.) and are still accessible to older browsers.


-- 
Chris Lambert
[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] Executing graphical application (linux)

2001-09-11 Thread Chris Lambert


Is it possible to execute a graphical application using exec() or one of the 
related commands?

I have tried running it directly and from an external script but neither 
work.


Thanks,


-- 
Chris Lambert
[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] Executing graphical application (linux)

2001-09-11 Thread Chris Lambert

[EMAIL PROTECTED] (Nayco) wrote in
017601c13a9d$f3614840$0100a8c0@p2333:">news:017601c13a9d$f3614840$0100a8c0@p2333: 

 have you tried with specifiing th e display to use 
 
  something like EXEC (my_app --display 0:0)
 
 well  this may be possible, everything is possible with a keyboard
 and many imagination ;~p
 

Yes, I have set the display (although from a shell script rather than
using parameters.

Thanks,

-- 
Chrisa Lambert
[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] ftp_get

2001-08-26 Thread Chris Lambert

It looks like you might not have permissions set for the web server to
create files in /web/...

If you know the names of the files which will be transferred ahead of time,
you can manually create them from FTP or your shell, then chmod them to 777.
Otherwise you might be better off creating a folder (/web/ftp/) and chmoding
the folder itself to 777.

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: MBK [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, August 26, 2001 2:51 PM
Subject: [PHP] ftp_get


How exactly does ftp_get work?

I tried it several times, but it always said something like
Warning: error opening /web/destinationfile.html in .scriptlocation.. on
line 38

line 38 has: ftp_get($conn_id, $destfile, $remotefile, FTP_BINARY);

Can someone please help me with this.

-Maarten



-- 
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 Database backup

2001-08-26 Thread Chris Lambert

The easiest way would be to call mysqldump from PHP (system, exec,
backticks, whatever) and pipe it to a file, all from the command line. This
would backup the core data in the form of valid MySQL statements. If you
have several indexes, this method will actually produce smaller files as
well.

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: Alex Sofronie [EMAIL PROTECTED]
To: PHP General [EMAIL PROTECTED]
Sent: Sunday, August 26, 2001 3:28 PM
Subject: [PHP] MySQL Database backup


| I tried find a solution to backup a mysql database using php but i didn't
| find anything but the binary file transfer solution (just open and binary
| copy all the files in my database directory). But this is not a desired
| solution because it involves some security holes that I cannot afford.
| Can anyone tell me where can i learn more about this? Or some simple :)
and
| security holes free solution?
|
| Thanks all.
| Alex Sofronie
| [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] Shell or http?

2001-08-26 Thread Chris Lambert

It depends on how the webserver is setup. If its being run as a CGI then it
depends if suEXEC is enabled. If its not, it should be run as nobody,
whereas if it is (and the user/group paramater in httpd.conf is set) it'll
be run as whatever the directive is set to. If its run as a module, then the
userid should be nobody. Where are you trying to identify it from?

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: George E. Papadakis [EMAIL PROTECTED]
To: PHP List [EMAIL PROTECTED]
Sent: Sunday, August 26, 2001 1:36 PM
Subject: [PHP] Shell or http?


| Hi,
|
| Is there any way to identify if a php script is running through a shell or
| web?
| Thanks in advance.
|
|
| -- GeorgeP
|
|
| --
| 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] getting values inside PHP from outside script

2001-08-26 Thread Chris Lambert

The easy  ugly one line solution:

$csvalues = explode(,, implode(,
file(http://au.finance.yahoo.com/d/quotes.csv?s=NABm=af=sl1d1t1c1ohgve=.
csv)))

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: Scott Mebberson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, August 26, 2001 9:04 PM
Subject: [PHP] getting values inside PHP from outside script


| Hi Guys,
|
| I want to write a script that retrieves quote prices off the ASX
(Australian
| Stock Exchange) and then adds it to the database.
|
| I think the only way I can do this is by using the yahoo finance
query.
| I need to know how I can call a string within my PHP script and then get
the
| results. The results are returned in a comma delimited format. Any ideas?
|
| use
| http://au.finance.yahoo.com/d/quotes.csv?s=NABm=af=sl1d1t1c1ohgve=.csv
to
| see the results.
|
| thanks
|
| Scott.
|
|
|
| --
| 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: Dedicated Hosting

2001-08-26 Thread Chris Lambert

Its uncommon for people to have used more than one dedicated server
provider, simply because they're a bit on the expensive side and likewise
comparitive reviews are hard to come by. However, I have used Communitech
years back and have had only bad experiences with them.

http://www.webhostingtalk.com/search.php?action=showresultssearchid=95278
- good site to search around on

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: Raphael Pirker [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, August 26, 2001 9:28 PM
Subject: [PHP] Re: Dedicated Hosting


| www.communitech.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] convert 12:12:00 to seconds

2001-08-22 Thread Chris Lambert

$seconds = explode(:, $time);
$seconds = $seconds[0] * 3600 + $seconds[1] * 60 + $seconds[2];

Or use www.php.net/mktime

/* 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: Thursday, August 23, 2001 9:30 AM
Subject: [PHP] convert 12:12:00 to seconds


| 
| hi.
| how do I covert convert  12:12:00  to seconds ?
| I want to get time from system and covert it to seconds to do
| arithmetic work on it.
|  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] Importing a GIF image and making it transparent

2001-08-21 Thread Chris Lambert

It doesn't look like you'll be able to use GD, as GIF support was dropped in
1.6 and JPEG support was only added in 1.8. You'd have to experiment with
ImageMagick, or another command-line tool independent of PHP.

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: Ben Quinn [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, August 21, 2001 2:23 AM
Subject: [PHP] Importing a GIF image and making it transparent


| Hi all
|
|  I've been trying to make a script that imports a GIF image from an
external
| server (i have permission to do this, see below) and designates a certain
| colour transparent for some time now and i'm not having much luck. Can
| anyone help or provide a script that does this?
|
| The images i'm using are Australian weather radar images with a rather
plain
| brown background
|
| http://mirror.bom.gov.au/radar/IDR503.gif
|
| What i'd like to do is have an orographic map for the background, like
this
|
| http://www.bsch.au.com/temp/preview.jpg
|
| The radar images are available to the public and i have permission to make
| these alterations
|
| Is it possible for PHP to download a GIF image (through HTTP), designate a
| certain colour transparent and then display the image on the screen
without
| saving the image to the server?
|
| Any help i can get with this would be much 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 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] Importing a GIF image and making it transparent

2001-08-21 Thread Chris Lambert

Did you use quotes around the URL when trying to access the image?

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: Ben Quinn [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, August 21, 2001 6:09 AM
Subject: Re: [PHP] Importing a GIF image and making it transparent


|
| Thanks to those who replied, i finally worked it out - the script has been
| pasted below just incase anyone is sifting through the list archives
looking
| for the same thing.  One thing though, my server doesn't allow me to open
a
| GIF file through HTTP - ie this doesn't work
|
| $image = ImageCreateFromGif(http://www.severname.com/image.gif);
|
| Does anyone know of a server/hosting company that will allow me to do
this?
|
|
| The script:
|
| ?
|
| $id = ImageCreateFromGif(image.gif);
|
| $trans = imagecolorexact($id, 120, 100, 90);
|
| imagecolortransparent($id, $trans);
|
| ImageGIF($id,newimage.gif);
|
| echo done;
|
| ?
|
|
|
| - Original Message -
| From: Chris Lambert [EMAIL PROTECTED]
| To: Ben Quinn [EMAIL PROTECTED]
| Cc: [EMAIL PROTECTED]
| Sent: Tuesday, August 21, 2001 4:49 PM
| Subject: Re: [PHP] Importing a GIF image and making it transparent
|
|
|  It doesn't look like you'll be able to use GD, as GIF support was
dropped
| in
|  1.6 and JPEG support was only added in 1.8. You'd have to experiment
with
|  ImageMagick, or another command-line tool independent of PHP.
| 
|  /* Chris Lambert, CTO - [EMAIL PROTECTED]
|  WhiteCrown Networks - More Than White Hats
|  Web Application Security - www.whitecrown.net
|  */
| 
|  - Original Message -
|  From: Ben Quinn [EMAIL PROTECTED]
|  To: [EMAIL PROTECTED]
|  Sent: Tuesday, August 21, 2001 2:23 AM
|  Subject: [PHP] Importing a GIF image and making it transparent
| 
| 
|  | Hi all
|  |
|  |  I've been trying to make a script that imports a GIF image from an
|  external
|  | server (i have permission to do this, see below) and designates a
| certain
|  | colour transparent for some time now and i'm not having much luck. Can
|  | anyone help or provide a script that does this?
|  |
|  | The images i'm using are Australian weather radar images with a rather
|  plain
|  | brown background
|  |
|  | http://mirror.bom.gov.au/radar/IDR503.gif
|  |
|  | What i'd like to do is have an orographic map for the background, like
|  this
|  |
|  | http://www.bsch.au.com/temp/preview.jpg
|  |
|  | The radar images are available to the public and i have permission to
| make
|  | these alterations
|  |
|  | Is it possible for PHP to download a GIF image (through HTTP),
designate
| a
|  | certain colour transparent and then display the image on the screen
|  without
|  | saving the image to the server?
|  |
|  | Any help i can get with this would be much 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 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] php executable

2001-08-20 Thread Chris Lambert

/usr/bin/php -q
...I believe.

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message - 
From: Nick Davies [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, August 20, 2001 6:06 AM
Subject: [PHP] php executable


| 
| Is it possible to surpress the 
| 
| X-Powered-By: PHP/4.0.6
| Content-type: text/html
| 
| text when running php from the commandline?
| 
| Thanks.
| Nick.
| 
| 
| -- 
| 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] $var , '$var'

2001-08-19 Thread Chris Lambert

In what context?

print $var; // prints the value of $var
print $var; // prints the value of $var
print '$var'; // prints $var

/* 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 2:33 AM
Subject: [PHP] $var , '$var'


| 
| hi.
| what is the difference between $var and '$var' ?/
| 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] transaction

2001-08-19 Thread Chris Lambert

I believe that'd be a question best suited for the PostgreSQL mailing lists,
since its handled at the database level with begin and commit.

/* 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] transaction


|
| hi.
| in large database with php,postgres
| and when in each time come many request ,
| how do we implement transactions??
| 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]




Re: [PHP] mysql , postgres

2001-08-19 Thread Chris Lambert

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]




Re: [PHP] Count total

2001-08-19 Thread Chris Lambert

Assuming MySQL...
?
$score = mysql_query(SELECT SUM(score), userid, name FROM score_table GROUP
BY userid);
mysql_query(DELETE FROM totalscore_table);
while (list($score, $userid, $name) = mysql_fetch_array($scores))
mysql_query(INSERT INTO totalscore_table (userid, name, totalscore)
VALUES ('$userid', '$name', '.addslashes($totalscore).'));
?

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: Martin Kampherbeek [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, August 19, 2001 5:34 AM
Subject: [PHP] Count total


Hi,

Who can help me with the following problem?
I have the tables score and totalscore.

Score:
id
userid
name
score

Totalscore:
userid
name
totalscore

In the table score one user can have mutiple scores. But in totalscore the
userid is unique. Now I want to count all the score's of a user en place
this at the same user in totalscore.

Example of score:
11Martin10
22John5
33Richard   12
41Martin  3
53Richard8
61Martin  7
72John15

So I would like to know the total score of each user.
But I don't know how to do this. Who can help me out?

Cheers,
Martin.





-- 
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 Chris Lambert

Rules, triggers, subselects, built in transactions, etc.

I haven't used it myself, but it does have features which relieve a lot of
the client programming (PHP) required with MySQL.

/* 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: Chris Lambert [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Sunday, August 19, 2001 5:41 AM
Subject: Re: [PHP] mysql , postgres


| 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]
|
|
|


-- 
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 Chris Lambert

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]




Re: [PHP] MySQL substrings?

2001-08-19 Thread Chris Lambert

It'd help if you have us the mysql_error() returned.

Try the following:

SELECT *, substring_date AS SUBSTRING(date,5,2) FROM $table ORDER BY
substring_date

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: Seb Frost [EMAIL PROTECTED]
To: Tom Carter [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Sunday, August 19, 2001 11:19 AM
Subject: RE: [PHP] MySQL substrings?


| This doesn't work:
|
| $result = mysql_query(SELECT * FROM $table ORDER BY SUBSTRING(date,5,2))
|
| Any idea why?
|
| - seb
|
| --
| 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] SQL Highlighting in PHP?

2001-08-18 Thread Chris Lambert

Hey all,

I'm wondering if anyone's created a custom function that'll perform SQL
highlighting, similar to the highlight_file/string functions for PHP source.
I made a quick hack, but I'd love to have something more consistent. Any
ideas?

/* 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]




Re: [PHP] IDE

2001-08-18 Thread Chris Lambert

Are you using NuSphere's version of PHPEd, or the old free one? So far, the
best Windows IDE I've used has been NuSphere's upgraded PHPEd. Zend's 2.0
IDE also looks promising, though.

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: Max Mouse [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, August 18, 2001 6:17 PM
Subject: [PHP] IDE


| Can anyone suggest a decent IDE for php? Currently, I'm using phped and
I'm
| not overly happy with it's performance...
|
| Max
|
|
| --
| 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] Zend Optimizer

2001-08-16 Thread Chris Lambert

It should perform the optimizations automatically. However, the bottleneck
in your case will be your image manipulation library (GD, ImageMagic,
etc..), and you most likely won't see much of a speed increase with the
optimizer.

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: Alfredeen, Johan [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, August 16, 2001 11:33 AM
Subject: [PHP] Zend Optimizer


| Ok, I've searched the archives and even contacted the Zend staff on this
| one, and I'm still confused. I also posted this question at the Zend
| Optimizer Forum but have not received an answer. I'm hoping one of you has
| some idea of how the Zend Optimizer works and can explain it. My webhost
| offers PHP 4 on Linux/Apache with the Zend Optimizer (v0.99) Engine
(v1.0.3)
| and I have checked phpinfo() to make sure it's installed and running. I
| would like to optimize a particular function that generates a graph image
on
| the fly. What do I need to do make use of the Zend Optimizer? Is it used
| automatically or do I first need to compile the code into a binary file?
If
| someone knows a great source of info on this (other than www.zend.com),
that
| would be helpful too.
|
| Thanks,
| Johan Alfredeen
|
|
| --
| 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] calendar, msg board, chat in PHP

2001-08-07 Thread Chris Lambert

plugvBulletin is PHP/MySQL backed forum software that includes an
integrated calendar component./plug

However, it'll cost you $85/site/year, so you might be best off tying a few
free components together.

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: Eric Wood [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, August 07, 2001 8:54 AM
Subject: [PHP] calendar, msg board, chat in PHP


| I'm looking to give each of my virtual domain accounts a calendar, msg
| board, and maybe a chat function to their web site.
|
| Anyone know of a php program that has messaging and calendaring working
| together?
|
| Thanks!
| -eric wood
|
|
|
| --
| 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] splitting text after 25 words

2001-08-07 Thread Chris Lambert

$teaser = explode( , $article, 26));
array_pop($teaser);
$teaser = implode( , $teaser);

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message - 
From: Justin French [EMAIL PROTECTED]
To: php [EMAIL PROTECTED]
Sent: Wednesday, August 08, 2001 12:57 AM
Subject: [PHP] splitting text after 25 words


| Hi all,
| 
| I'd like to split a text block at 25 words, as a teaser for the full 
| article.  Now I know how to split at a certain character, but i don't 
| want a half word or anything, so I want (i guess) to hunt for the 25th 
| occurence of   (a space), and split $text into two new variables,
| $text_a and $text_b.
| 
| Then I'll prolly want append something like ... click here to read 
| more on the end of $text_a.
| 
| Seems easy enough, but I can't see anything in the manual about 
| splitting on a numbered occurence of a string (but I could be looking
| in the wrong spot :)
| 
| Running PHP4 BTW
| 
| 
| 
| Thanks heaps in advance
| Justin 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] a good PHP editor

2001-07-18 Thread Chris Lambert - WhiteCrown Networks

Would you give the same advice if it were Zend Cache? Show some respect,
please.

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: Maxim Maletsky [EMAIL PROTECTED]
To: 'doug' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, July 18, 2001 2:41 PM
Subject: RE: [PHP] a good PHP editor


| EditPlus (editplus.com - not free but easily crackable through a simple
| search on astalavista.box.sk)
| A great editor - believe me.
|
| -maxim
|
|
| -Original Message-
| From: doug [mailto:[EMAIL PROTECTED]]
| Sent: Thursday, July 19, 2001 3:16 AM
| To: [EMAIL PROTECTED]
| Subject: [PHP] a good PHP editor
|
|
| Hiya everybody,
| I'm relatively new to PHP and I'm looking for a good text editor on
| win2k for creating/manipulating php pages. Notepad is great if your in a
| bind, and I've tried phpedit and activestate's Komodo and both seem to
have
| problems (crashing etc...). Anybody got any suggestions? Free/small fee
| programs doesn't matter Thanks
|
| Doug Henry
|
|
| --
| 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]OT I know, but WTF...

2001-07-15 Thread Chris Lambert - WhiteCrown Networks

That the IE6 beta is a beta.

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: Chris Anderson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; PHP General List (E-mail)
[EMAIL PROTECTED]
Sent: Sunday, July 15, 2001 5:35 PM
Subject: Re: [PHP]OT I know, but WTF...


| I've actually had an MS representative tell me not to use the IE6 beta.
| What's that tell you?
| - Original Message -
| From: Chris Cocuzzo [EMAIL PROTECTED]
| To: PHP General List (E-mail) [EMAIL PROTECTED]
| Sent: Sunday, July 15, 2001 12:08 PM
| Subject: [PHP]OT I know, but WTF...
|
|
|  hey-
| 
|  I know this is off topic, but I figured i'd ask to see if other people
| were
|  experiencing similar problems. I'm having trouble accessing web
| sites/pages
|  that are secure(https...obviously). I tried changing everything around
in
| IE
|  6, but so far nothing is working...any ideas?
| 
|  the error is the normal, annoying, page can't be found or dns error
bull.
| 
|  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]
|
|
|


-- 
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] Web application?

2001-07-14 Thread Chris Lambert - WhiteCrown Networks

And the article was written by Joshua Drake, not Zeev. It seems to have been
published early January, judging by some Google research. Not sure why it
isn't in Zend's article DB anymore...

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: Rasmus Lerdorf [EMAIL PROTECTED]
To: Martín Marqués [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Saturday, July 14, 2001 11:24 AM
Subject: Re: [PHP] Web application?


|  On Sáb 14 Jul 2001 12:09, Rasmus Lerdorf wrote:
|Thats not the worst thing I find in it. MySQL has referential
integrity?
|How about locking for update of rows? You have to lock the whole
table!
|  
|   Actually both the innodb and gemini backends for MySQL have row-level
|   locking.
| 
|  That must be really new, cause the biggest blame I find over MySQL is
the
|  table locking feature (Zeev Suraski articule also talks about it).
|
| Has been there for months.  Since version 3.23.30
|
| -Rasmus
|
|
| --
| 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] Web application?

2001-07-14 Thread Chris Lambert

Well, all the comparisons were based on year old (July 2000) versions of
each database, so not everything mentioned still holds true today.
 __
/ Chris Lambert - [EMAIL PROTECTED]
|- ICQ #: 16435685 - AIM: ClipperChris
`- Cell: (401) 743-2786 - http://sms.clambert.org/
- Original Message -
From: Matthew Loff [EMAIL PROTECTED]
To: 'Chris Lambert - WhiteCrown Networks' [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Saturday, July 14, 2001 1:57 PM
Subject: RE: [PHP] Web application?



Just for reference, I originally meantioned a comparison of PostgreSQL
beta vs. MySQL latest--  here's the article:

http://www.phpbuilder.com/columns/tim2705.php3?page=1

I'm curious to hear comments on stability of Postgres, since the author
of that article meantions it as a concern of his.


-Original Message-
From: Chris Lambert - WhiteCrown Networks [mailto:[EMAIL PROTECTED]]
Sent: Saturday, July 14, 2001 11:30 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Web application?


And the article was written by Joshua Drake, not Zeev. It seems to have
been published early January, judging by some Google research. Not sure
why it isn't in Zend's article DB anymore...

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: Rasmus Lerdorf [EMAIL PROTECTED]
To: Martín Marqués [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Saturday, July 14, 2001 11:24 AM
Subject: Re: [PHP] Web application?


|  On Sáb 14 Jul 2001 12:09, Rasmus Lerdorf wrote:
|Thats not the worst thing I find in it. MySQL has referential
integrity?
|How about locking for update of rows? You have to lock the whole
table!
|  
|   Actually both the innodb and gemini backends for MySQL have
|   row-level locking.
| 
|  That must be really new, cause the biggest blame I find over MySQL
|  is
the
|  table locking feature (Zeev Suraski articule also talks about it).
|
| Has been there for months.  Since version 3.23.30
|
| -Rasmus
|
|
| --
| 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] Read and write

2001-07-13 Thread Chris Lambert - WhiteCrown Networks

Put quotes around rb, but I don't think you need the b.

Also, are the integers always char(4)?

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: Francois Boucher [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, July 13, 2001 7:55 AM
Subject: [PHP] Read and write


| I need to read in a binary file.
| (the file is write in c++ and contain integer,
interger,char(10),char(10) )
|
| So I need to read this and write it in normal caracters.
|
| So I try:
|  $fp = fopen(data_bin.dat,rb);
|  $data[] = fread($fp,4);
|  $data[] = fread($fp,4);
|  $data[] = fread($fp,10);
|  $data[] = fread($fp,10);
|
| but i think it wrong...
|
| Thanks.
|
|
| -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
| -=   François Boucher  =-
| -=  [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] forms and IP numbers

2001-07-13 Thread Chris Lambert - WhiteCrown Networks

This would be just as bad, as he could open up a socket faking a referer.
What you really need are data integrity checks inside the script which posts
to the message board on your server.

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: Marc van Duivenvoorde [EMAIL PROTECTED]
To: Php general lijst [EMAIL PROTECTED]
Sent: Friday, July 13, 2001 6:09 AM
Subject: [PHP] forms and IP numbers


| A friend of mine found a bug in my messageboard code, this way he can post
| with other (than in my database) nicknames from a local form. Now I want
to
| have the formhandler do a check from where the form is sent. If it is not
| sent from my own webserver it has to display an error message.
|
| 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] O'Reilly Open Source Conference

2001-07-13 Thread Chris Lambert - WhiteCrown Networks

As the conference date draws nearer, I'd like to try and get familiar with
some of the other list members who'll be attending.

What sessions or tutorials are you looking forward to?
What's your background with PHP, MySQL, or other open source technologies?
What company, if any, will you be representing?
Where are you flying in from?
What're you hoping to bring back from the convention?

...and anything else you might be find relevant.

/* 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]




Re: [PHP] Web application?

2001-07-13 Thread Chris Lambert - WhiteCrown Networks

Should be fine, but if your main script is HUGE, say, 1MB (hey, it's
possible, if all HTML was inline :-) then you should consider breaking it up
to seperate files and include()'ing them. Require() is just as bad as having
them inline, in terms of memory usage, but include() replaces them only if
they're called during that specific instance.


/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: Yves Gauvreau [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, July 13, 2001 5:24 PM
Subject: [PHP] Web application?


| Hi,
|
| The question is this: Say I have a large main script that handles most
| of the request if not all, I wonder what are the effect of this approach
| on performance in a situation where we have a fair number of concurrent
| users?
|
| Situation:
|
| Server:
| P4 1300, Linux (RH 7.1), Apache, MOD_PHP, mySQL.
|
| Thanks
|
| Yves Gauvreau
|
|
| --
| 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] Web application?

2001-07-13 Thread Chris Lambert - WhiteCrown Networks

It all depends on your application, the use it receives, your server
hardware (mainly RAM), and your MySQL/PHP configurations.

For 90% of web applications, and 90% of the loads they receive, any
confiuguration of MySQL would be fine. But describe your scenario and we
should be able to let you know if all will be OK.

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: Yves Gauvreau [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; Rasmus Lerdorf [EMAIL PROTECTED]
Sent: Friday, July 13, 2001 5:48 PM
Subject: Re: [PHP] Web application?


| Is that to say that mySQL is not a good choice in this situation?
|
| If you would be so kind. Why would mySQL be the bottleneck and why PHP
| would not?
|
| Regards.
|
| Yves
|
|
| Rasmus Lerdorf wrote:
|
|  Should be fine.  Chances are your bottleneck will be your database, not
|  PHP.
| 
|  -Rasmus
| 
|  On Fri, 13 Jul 2001, Yves Gauvreau wrote:
| 
| 
| Hi,
| 
| The question is this: Say I have a large main script that handles most
| of the request if not all, I wonder what are the effect of this approach
| on performance in a situation where we have a fair number of concurrent
| users?
| 
| Situation:
| 
| Server:
| P4 1300, Linux (RH 7.1), Apache, MOD_PHP, mySQL.
| 
| Thanks
| 
| Yves Gauvreau
| 
| 
| 
| 
| 
|
|
|
| --
| 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 to fetch a group by Query?

2001-07-11 Thread Chris Lambert - WhiteCrown Networks

Couldn't you just do something like:

?
$rows = mysql_query(SELECT * FROM table ORDER BY category, title);
while ($row = mysql_fetch_array($rows)) {
if ($row[title]  $last)
print b$row[category]/bbr\r\n;
print li$row[title]/libr\r\n;
$last = $row[title];
}
?

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: Tim Ward [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; Frédéric Mériot
[EMAIL PROTECTED]; PHP General List [EMAIL PROTECTED]
Sent: Wednesday, July 11, 2001 4:00 AM
Subject: RE: [PHP] How to fetch a group by Query?


this is the sort of thing I usually do ...

$result = mysql_query($db, SELECT * FROM filename...)
while ($array = mysql_fetch_array($result)) $category[$array[category]][]
= $array[title];
foreach ($category as $cat=$title_array)
{ echo(Category $catbr);
foreach ($title_array as $title) echo(   - $titlebr);
}

a lot simpler and you don't have to worry about any start and end
conditions. This can also be extrapolated to more complex situations, e.g.
where $title contains more than just a name you can do sub totals of title
quantities by category, or whatever.

Tim Ward
Senior Systems Engineer

Please refer to the following disclaimer in respect of this message:
http://www.stivesdirect.com/e-mail-disclaimer.html


 -Original Message-
 From: David Robley [mailto:[EMAIL PROTECTED]]
 Sent: 11 July 2001 02:17
 To: Frédéric Mériot; PHP General List
 Subject: Re: [PHP] How to fetch a group by Query?


 On Tue, 10 Jul 2001 22:10, Frédéric Mériot wrote:
  Hello (again)
 
  I've got a query which extract titles and categories with a
 group by on
  the categorie. Is there a simple way to display rows like
 this (without
  doing a second query ):
 
  Categorie A
  -titi
  -toto
  -tutu
 
  Categorie B
  -bibi
  -nini
  -fififi
 
  Categorie C
  -titi
  -toto
  -tutu
 
  ... etc
 
  With cold fusion (for those who know) I want to do the same as
  CFOUTPUT QUERY=myquery GROUP=categorie
 
  Thanks

 Select category, description from table where whatever order
 by category,
 description

 Then when you display the rows, keep track of the current and
 previous
 value of $description; if it changes, print the new value.

 --
 David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
 CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA

Don't stop posting, a good laugh breaks up my day nicely


--
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] Getting the title of a web page

2001-07-11 Thread Chris Lambert - WhiteCrown Networks

?preg_match(/\title\(.*)\\/title\/i, implode(,
file(http://www.php.net/;)), $title);?
?=$title[1]?

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: Heiko Wilms [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 11, 2001 6:32 AM
Subject: [PHP] Getting the title of a web page


Hi,

when I open a web page within my php-script with fopen(...) I only want
to get back the title of the page. How can I do this?

Heiko

--
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] Joining a number of tables in a MySQL query

2001-07-11 Thread Chris Lambert - WhiteCrown Networks

SELECT
 WLPaddress.city,
 WLPaddress.state,
 WLPbib.publisher,
 WLPbib.title,
 WLPbib.publicationDate,
 WLPprofile.firstName,
 WLPprofile.lastName,
 WLPprofile.organization,
 WLPcountry.languageName
FROM
 WLPbib
LEFT JOIN
 WLPprofile
  ON
 WLPprofile.profileID = WLPbib.profileID
LEFT JOIN
 WLPaddress
  ON
 WLPaddress.publisherID = WLPbib.publisherID
LEFT JOIN
 WLPcountry
  ON
 WLPcountry.countryID = WLPaddress.countryID

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: Mike Gifford [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 11, 2001 6:40 AM
Subject: [PHP] Joining a number of tables in a MySQL query


| Hello,
|
| I'm trying to relate four tables within a single query and am running into
| difficulties.  Heck, I don't even know if it is possible.  Most of the
| explainations I see are for two tables, not four...
|
| So I'm trying to do something like this:
|
| SELECT  address.city,
|address.state,
|  bib.publisher,
|  bib.title,
|  bib.publicationDate,
|  profile.firstName,
|  profile.lastName,
|  profile.organization,
|  country.languageName
| FROM WLPbib bib
| JOIN ON  WLPprofile profile USING (profileID)
| JOIN ON WLPaddress address USING (publisherID)
| JOIN ON WLPcountry country USING (countryID)
|
| I don't know how to express the following relationship in the query above:
|The tables WLPbib  WLPprofile share the value profileID
|WLPbib and WLPaddress share the value publisherID
|WLPaddress and WLPcountry share the value countryID
|
| I also used JOIN ON, but didn't know if any of these others would be more
| appropriate:
|
| Cross Join
| select c.name, o.cid from orders o, clients c where o.cid = acm-042;
|
| equijoin
| select p.os, c.name from orders o, pcs p, clients c where p.pid=o.pid and
o.pid
| = 1 and o.cid=c.cid;
|
| non-equijoin
| SELECT p.os, o.pid from orders o, pcs p where o.pid  p.pid;
|
| Left Join
| select * from orders left join pcs on orders.pid = pcs.pid;
| select * from orders left join pcs on pcs.pid = 3 and orders.pid =
pcs.pid;
|
| Using Option
| SELECT * from clients join on orders where clients.cid = orders.cid;
| SELECT * from clients join on orders using (cid);
| --
| Mike Gifford, OpenConcept Consulting, http://openconcept.ca
| Offering everything your organization needs for an effective web site.
| Abolish Nuclear Weapons Now!: http://pgs.ca/petition/
| It is a miracle that curiosity survives formal education. - A Einstein
|
|
| --
| 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] Reading the content.

2001-07-11 Thread Chris Lambert - WhiteCrown Networks

As far as I know, you don't. :-(

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: Gustavo Carreno [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 11, 2001 6:54 AM
Subject: [PHP] Reading the content.


| Hi tere,
|
| Imagine that someone does the following post:
|
| ---8-
| POST /bla.php HTTP/1.0
| host: bla.com
| content-type: text/xml
| content-length: ##
|
| ?xml blabla?
| bla
| /bla
| ---8-
|
| With what function, variable, server variable or whatever do I have access
| to that XML?
| I'm not concerned with the parsing, that is quite simple, I'm concerned
with
| the access to
| that content!!!
|
| Gustavo Carreno
|
|
|
|
|
| --
| 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] Reading the content.

2001-07-11 Thread Chris Lambert - WhiteCrown Networks

Are you sure? I tested posting to a script which simply did a
print_r($GLOBAL), and didn't see the posted data listed.

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: Gustavo Carreno [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 11, 2001 10:22 AM
Subject: Re: [PHP] Reading the content.


| Chris Lambert - Whitecrown Networks [EMAIL PROTECTED] wrote in
| message 000b01c109fc$1857cb60$6401a8c0@server">news:000b01c109fc$1857cb60$6401a8c0@server...
|  As far as I know, you don't. :-(
|
|   And as far as you know, you are wrong :))
|   If there is no variables on the post the whole content of the post is
held
| on $HTTP_RAW_POST_DATA
|
| Gustavo Carreno
|
|
|
|
| --
| 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] security

2001-07-10 Thread Chris Lambert - WhiteCrown Networks

Check what the user agent is for the SWF, and see if it passes a specific
referer. That should deter 99% of attempts.

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: AVisioN:::nomoremedia::: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 10, 2001 12:08 PM
Subject: [PHP] security


| Is it possible to restrict the use of a php-file to a special file (for
| example an swf).
|
|
| --
| ---: AVisioN :---
| http://www.nomoremedia.de
| -::[EMAIL PROTECTED]::-
|
| I have nothing to declare except my genius._oscar_wild
|
|
|
| --
| 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] Line by Line , Word by Word

2001-07-10 Thread Chris Lambert - WhiteCrown Networks

www.php.net/fgetcsv

Use a space as the deliminator.

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message - 
From: alfareees alfareees [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 10, 2001 12:43 PM
Subject: [PHP] Line by Line , Word by Word


| How to read file line by line and read line word by word
| 
| _
| Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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] Image manipulation

2001-07-10 Thread Chris Lambert - WhiteCrown Networks

www.php.net/GetImageSize

list($width, $height) = getimagesize(file.gif);

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message - 
From: Kevin Pratt [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 10, 2001 1:04 PM
Subject: [PHP] Image manipulation


| Does any one know if you can check the dimensions of a GIF file?
| 
| Thanks
| Kevin
| 
| 
| -- 
| 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] security

2001-07-10 Thread Chris Lambert - WhiteCrown Networks

But the advantage of checking user agents would be that they'd either have
to write a new flash script, or manually post to the form via sockets, as
using I.E. to go to game.php?winner=me wouldn't work.

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: py [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 10, 2001 9:04 AM
Subject: Re: [PHP] security


| But remember that once a user has accessed the .swf once, they can then
| get the path and call the file directly afterwards. Even worse, the .swf
is
| in the computer's cache.
|
| py
| - Original Message -
| From: Chris Lambert - WhiteCrown Networks [EMAIL PROTECTED]
| To: AVisioN:::nomoremedia::: [EMAIL PROTECTED]
| Cc: [EMAIL PROTECTED]
| Sent: Tuesday, July 10, 2001 5:30 PM
| Subject: Re: [PHP] security
|
|
|  Check what the user agent is for the SWF, and see if it passes a
specific
|  referer. That should deter 99% of attempts.
| 
|  /* Chris Lambert, CTO - [EMAIL PROTECTED]
|  WhiteCrown Networks - More Than White Hats
|  Web Application Security - www.whitecrown.net
|  */
| 
|  - Original Message -
|  From: AVisioN:::nomoremedia::: [EMAIL PROTECTED]
|  To: [EMAIL PROTECTED]
|  Sent: Tuesday, July 10, 2001 12:08 PM
|  Subject: [PHP] security
| 
| 
|  | Is it possible to restrict the use of a php-file to a special file
(for
|  | example an swf).
|  |
|  |
|  | --
|  | ---: AVisioN :---
|  | http://www.nomoremedia.de
|  | -::[EMAIL PROTECTED]::-
|  |
|  | I have nothing to declare except my genius._oscar_wild
|  |
|  |
|  |
|  | --
|  | 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] PHP Conference in California

2001-07-10 Thread Chris Lambert - WhiteCrown Networks

It didn't look like much is being exhibited, though.

It'd be quite a trip coming from Israel, but I'm sure Zeev's doing it... ;-)

You just need to evaluate how much the sessions  tutorials are worth to you
or your company. If there's nothing that interests you, its probably not
worth going. Otherwise, you should look into it.

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: Aaron Bennett [EMAIL PROTECTED]
To: Uri Even-Chen [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, July 10, 2001 2:13 PM
Subject: Re: [PHP] PHP Conference in California


| Well, exhibit hall is free... I'll be there.. of course, its only 10
minutes
| away. *grin*
| --
| Aaron
|
| - Original Message -
| From: Uri Even-Chen [EMAIL PROTECTED]
| To: [EMAIL PROTECTED]
| Sent: Tuesday, July 10, 2001 9:11 AM
| Subject: [PHP] PHP Conference in California
|
|
|  I have heard about the PHP Conference  O'Reilly Open Source Convention
|  in San Diego, California. Do you think it is worth being there? I saw
|  the prices and it's quite expensive. Not to mention the cost to get
|  there...
| 
|  http://conferences.oreilly.com/oscon/
| 
| 
|  Thanks,
| 
|  Uri Even-Chen
|  Speedy Software
|  Raanana, Israel.
|  
|  Welcome to Speedy Net (In Hebrew):
| http://www.speedy.co.il/
|  Speedy Dating (In Hebrew):
| http://dating.speedy.co.il/
|  Speedy Composer (In English):
| http://www.speedy.co.il/composer/
|  
| 
|  --
|  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] deletion of temp files

2001-07-10 Thread Chris Lambert - WhiteCrown Networks

Sessions support garbage removal, where the temp files will be deleted at a
random time after the user has left.

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: Anurag Bhalla [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, July 09, 2001 3:14 AM
Subject: [PHP] deletion of temp files


Hi list

In my application,I need to generate some files for each
user who comes to my site.These files need to be deleted
once the user logs off. Pls suggest some way to delete these
files once the user logs off ; perhaps with the use of sessions

Regards

Anurag






-- 
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 hide dbconnect file if its in publisheddirectory?

2001-07-10 Thread Chris Lambert - WhiteCrown Networks

I didn't read the first parts of this thread, but the reason for it working
in the first example and not the second is because the web server/php engine
process php files when they're called over HTTP. This means that the
define() call is being executed, but your primary script only includes what
is sent through output. Since there is no output, there is no value to
include.

You can include(/path/to/local/dir/file.php) and it'll simply include the
source code, not the processed output. But anything being called via HTTP
will be processed as if you were viewing that file from a web browser.

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: Thomas David Kehoe [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 10, 2001 2:37 PM
Subject: Re: [PHP] how to hide dbconnect file if its in publisheddirectory?


| The suggestion to use the .php extension instead of the .inc extension
| doesn't work.
|
| I created to identical files, swordfish.php and swordfish.inc, containing
| the following script:
|
| ?php
| define(PASSWORD, swordfish);
| ?
|
| When I use the following lines
|
| include ('http://www.friendshipcenter.com/Objects/swordfish.inc');
| echo Your password is , PASSWORD;
|
| it works, i.e., prints Your password is swordfish.
|
| When I use the following lines
|
| include ('http://www.friendshipcenter.com/Objects/swordfish.php');
| echo Your password is , PASSWORD;
|
| it doesn't work, i.e., prints Your password is PASSWORD.
|
| I tried putting swordfish.inc in my cgi-bin directory, which is outside
my
| www directory.  I can't figure out what pathname to call it with.  I.e.,
|
| include ('cgi-bin/swordfish.inc');
|
| can't find the file.
|
| As I wrote earlier, my .inc files can be read by anyone typing in the URL.
| It doesn't matter if there are ?php ? lines.  .inc files don't execute.
|
| I rent server space from phpwebhosting.com, so I can't change the PHP
| settings.
|
| Any other ideas how to hide a password file?
| --
| Thomas David Kehoe, author of
| THE EVOLUTION OF INTIMATE RELATIONSHIPS
| How Our Brains Are Hardwired For Relationships
| http://www.FriendshipCenter.com/TEIR/
|
|
| --
| 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] Next Book

2001-07-08 Thread Chris Lambert - WhiteCrown Networks

Good books for advanced topics are:
PHP4 Developer's Guide (Schwendiman)
PHP Developer's Cookbook (Hughes)
Web Application Development for PHP 4.0 (Ratschiller, Gerken)

And for MySQL,
Surprisingly, O'Reilly's version is weak, but Dubois' MySQL for New Riders
is very comprehensive. NuSphere hired Dubois as a tech writer for them a few
months back, too... :-)

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: Chris Lott [EMAIL PROTECTED]
To: Php-General (E-mail) [EMAIL PROTECTED]
Sent: Sunday, July 08, 2001 2:23 AM
Subject: [PHP] Next Book


| Finished with Beginning PHP from Wrox. Am eyeing Advanced PHP from Wrox.
| Other good books I should think about? Recommendations? Reviews? I know
the
| PHP FAQ has pointers to books, but I am looking for recommendations on
what
| I SHOULD get as I transition from a Cold Fusion person to a PHP devotee :)
|
| Also looking for a good book on MySQL. The MySQL/MSQL book from O'Reilly
is
| pretty dated.
|
| c
|
| --
| 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] Sort an array by its values

2001-07-08 Thread Chris Lambert - WhiteCrown Networks

Do you mean something like www.php.net/ksort or www.php.net/krsort?

I'm not sure of the actual structure of your array, though, so those might
not work as expected.

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: Aaron Bennett [EMAIL PROTECTED]
To: Php-General (E-mail) [EMAIL PROTECTED]
Sent: Sunday, July 08, 2001 4:25 AM
Subject: [PHP] Sort an array by its values


| Hi All,
|   I'm trying to sort an array of objects by the value of one of those
| objects...
| for instance, I'll have an object with 2 properties, id and score,
where
| id is unique and score is its relevant (and sometimes simelar) score. i've
| tried using sort() and asort() but i can't figure how to base the sorting
| off the value (i.e. score) of the object in the array. Any help?
| --
| Aaron
|


-- 
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] Sort an array by its values

2001-07-08 Thread Chris Lambert - WhiteCrown Networks

Can you print_r($variable) and post it here?

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: Aaron Bennett [EMAIL PROTECTED]
To: 'Chris Lambert - WhiteCrown Networks' [EMAIL PROTECTED]; Aaron
Bennett [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Sunday, July 08, 2001 4:34 AM
Subject: RE: [PHP] Sort an array by its values


| Chris,
|   I'm looking at ksort as i type... the problem i'm having is that i'm
| trying to sort a value inside an object inside that array (rather than
| paired values in an assoc. array)
| --
| Aaron
|
| -Original Message-
| From: Chris Lambert - WhiteCrown Networks [mailto:[EMAIL PROTECTED]]
| Sent: Sunday, July 08, 2001 1:33 AM
| To: Aaron Bennett
| Cc: [EMAIL PROTECTED]
| Subject: Re: [PHP] Sort an array by its values
|
|
| Do you mean something like www.php.net/ksort or www.php.net/krsort?
|
| I'm not sure of the actual structure of your array, though, so those might
| not work as expected.
|
| /* Chris Lambert, CTO - [EMAIL PROTECTED]
| WhiteCrown Networks - More Than White Hats
| Web Application Security - www.whitecrown.net
| */
|
| - Original Message -
| From: Aaron Bennett [EMAIL PROTECTED]
| To: Php-General (E-mail) [EMAIL PROTECTED]
| Sent: Sunday, July 08, 2001 4:25 AM
| Subject: [PHP] Sort an array by its values
|
|
| | Hi All,
| |   I'm trying to sort an array of objects by the value of one of those
| | objects...
| | for instance, I'll have an object with 2 properties, id and score,
| where
| | id is unique and score is its relevant (and sometimes simelar) score.
i've
| | tried using sort() and asort() but i can't figure how to base the
sorting
| | off the value (i.e. score) of the object in the array. Any help?
| | --
| | Aaron
| |
|


-- 
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] simple question

2001-07-08 Thread Chris Lambert - WhiteCrown Networks

eval(\$string=\.eregi_replace(([^A-Z]),
\\x\.dechex(ord(\\\1\)).\, $string).\;);

;-)

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: ReDucTor [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, July 08, 2001 10:18 AM
Subject: [PHP] simple question


is there a function to turn all chars that are not alphanumric to show \xhh
but hh being the hex version of 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]




Re: [PHP] simple question

2001-07-08 Thread Chris Lambert

Lowercase letters are included (eregI_replace) but you could add number
support with:
[^A-Z0-9]
 __
/ Chris Lambert - [EMAIL PROTECTED]
|- ICQ #: 16435685 - AIM: ClipperChris
`- Cell: (401) 743-2786 - http://sms.clambert.org/
- Original Message -
From: ReDucTor [EMAIL PROTECTED]
To: Chris Lambert - WhiteCrown Networks [EMAIL PROTECTED]
Sent: Sunday, July 08, 2001 11:45 AM
Subject: Re: [PHP] simple question


| nice, but i might change it to have lower case and numbers...hehehe
|
| btw thx
| - Original Message -
| From: Chris Lambert - WhiteCrown Networks [EMAIL PROTECTED]
| To: [EMAIL PROTECTED]
| Sent: Monday, July 09, 2001 12:50 AM
| Subject: Re: [PHP] simple question
|
|
|  eval(\$string=\.eregi_replace(([^A-Z]),
|  \\x\.dechex(ord(\\\1\)).\, $string).\;);
| 
|  ;-)
| 
|  /* Chris Lambert, CTO - [EMAIL PROTECTED]
|  WhiteCrown Networks - More Than White Hats
|  Web Application Security - www.whitecrown.net
|  */
| 
|  - Original Message -
|  From: ReDucTor [EMAIL PROTECTED]
|  To: [EMAIL PROTECTED]
|  Sent: Sunday, July 08, 2001 10:18 AM
|  Subject: [PHP] simple question
| 
| 
|  is there a function to turn all chars that are not alphanumric to show
| \xhh
|  but hh being the hex version of 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]




Re: [PHP] simple question

2001-07-08 Thread Chris Lambert - WhiteCrown Networks

You messed up the regular expression I gave you. The parenthesis need to go
in the first paramater, not the second. Otherwise it will replace an string
instead of a single character.

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: ReDucTor [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, July 08, 2001 1:28 PM
Subject: Re: [PHP] simple question


this is wierd, i have the following...

$buffer = eregi_replace([^A-Z0-9], (\\x.dechex(ord(\\1)).) ,
$buffer);

and this is what buffer is

m192.168.0.2:27015Counter-Strike 1.1
Serverde_dust2cstrikeCounterStrike+dwwww.nuclearbox.com/podbot

but this is what comes out

(\x5c)(\x5c)(\x5c)(\x5c)m192(\x5c)168(\x5c)0(\x5c)2(\x5c)27015

and \x5c is \

ne1 know why?
- Original Message -
From: Chris Lambert [EMAIL PROTECTED]
To: ReDucTor [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, July 09, 2001 2:47 AM
Subject: Re: [PHP] simple question


 Lowercase letters are included (eregI_replace) but you could add number
 support with:
 [^A-Z0-9]
  __
 / Chris Lambert - [EMAIL PROTECTED]
 |- ICQ #: 16435685 - AIM: ClipperChris
 `- Cell: (401) 743-2786 - http://sms.clambert.org/
 - Original Message -
 From: ReDucTor [EMAIL PROTECTED]
 To: Chris Lambert - WhiteCrown Networks [EMAIL PROTECTED]
 Sent: Sunday, July 08, 2001 11:45 AM
 Subject: Re: [PHP] simple question


 | nice, but i might change it to have lower case and numbers...hehehe
 |
 | btw thx
 | - Original Message -
 | From: Chris Lambert - WhiteCrown Networks [EMAIL PROTECTED]
 | To: [EMAIL PROTECTED]
 | Sent: Monday, July 09, 2001 12:50 AM
 | Subject: Re: [PHP] simple question
 |
 |
 |  eval(\$string=\.eregi_replace(([^A-Z]),
 |  \\x\.dechex(ord(\\\1\)).\, $string).\;);
 | 
 |  ;-)
 | 
 |  /* Chris Lambert, CTO - [EMAIL PROTECTED]
 |  WhiteCrown Networks - More Than White Hats
 |  Web Application Security - www.whitecrown.net
 |  */
 | 
 |  - Original Message -
 |  From: ReDucTor [EMAIL PROTECTED]
 |  To: [EMAIL PROTECTED]
 |  Sent: Sunday, July 08, 2001 10:18 AM
 |  Subject: [PHP] simple question
 | 
 | 
 |  is there a function to turn all chars that are not alphanumric to show
 | \xhh
 |  but hh being the hex version of 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 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: How to create a button with a icon inside ?

2001-07-08 Thread Chris Lambert

?
 Header(Content-type: image/png);
 $font = php.ttf;
 if(!$si) $si = 66;
 $im = ImageCreateFromPNG(php-blank.png);
 $tsize = imagettfbbox($si,0,$font,$text);
 $dx = abs($tsize[2]-$tsize[0]);
 $dy = abs($tsize[5]-$tsize[3]);
 $x = ( imagesx($im) - $dx ) / 2;
 $y = ( imagesy($im) - $dy ) / 2 + 3*$dy/4;
 $blue = ImageColorAllocate($im,0x5B,0x69,0xA6);
 $white = ImageColorAllocate($im,255,255,255);
 $black = ImageColorAllocate($im,0,0,0);
 ImageTTFText($im, $si, 0, $x, $y, $white, $font, $text);
 ImageTTFText($im, $si, 0, $x+2, $y, $white, $font, $text);
 ImageTTFText($im, $si, 0, $x, $y+2, $white, $font, $text);
 ImageTTFText($im, $si, 0, $x+2, $y+2, $white, $font, $text);
 ImageTTFText($im, $si, 0, $x+1, $y+1, $black, $font, $text);
 ImagePNG($im);
?

...from one of the PHP conferences.

php.ttf is the font

php-blank.png is the base image

$text is the text you want to write, and $si is the size of the font
 __
/ Chris Lambert - [EMAIL PROTECTED]
|- ICQ #: 16435685 - AIM: ClipperChris
`- Cell: (401) 743-2786 - http://sms.clambert.org/
- Original Message -
From: Mauro Ferreira [EMAIL PROTECTED]
Newsgroups: php.gtk
To: [EMAIL PROTECTED]
Sent: Sunday, July 08, 2001 1:10 PM
Subject: How to create a button with a icon inside ?


Can someone show me a example ?

I'm doing some refinements in an database-oriented app, and show database
navigation and action buttons with small icons instead of text will do a lot
for the visual - and cuts a lot in internationalization too !

If isn't ask for too much, a example of a combined icon+text button too will
be great too - some not-so-obvious actions, like data integrity check need a
text anyway.

Know how to make this will simplify my work a lot, not to mention the visual
aspect.

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]




Re: [PHP] Re: How to create a button with a icon inside ?

2001-07-08 Thread Chris Lambert - WhiteCrown Networks

Argh, responded to the wrong list. Apologies. :-)

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: Chris Lambert [EMAIL PROTECTED]
To: Mauro Ferreira [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Sunday, July 08, 2001 1:43 PM
Subject: [PHP] Re: How to create a button with a icon inside ?


| ?
|  Header(Content-type: image/png);
|  $font = php.ttf;
|  if(!$si) $si = 66;
|  $im = ImageCreateFromPNG(php-blank.png);
|  $tsize = imagettfbbox($si,0,$font,$text);
|  $dx = abs($tsize[2]-$tsize[0]);
|  $dy = abs($tsize[5]-$tsize[3]);
|  $x = ( imagesx($im) - $dx ) / 2;
|  $y = ( imagesy($im) - $dy ) / 2 + 3*$dy/4;
|  $blue = ImageColorAllocate($im,0x5B,0x69,0xA6);
|  $white = ImageColorAllocate($im,255,255,255);
|  $black = ImageColorAllocate($im,0,0,0);
|  ImageTTFText($im, $si, 0, $x, $y, $white, $font, $text);
|  ImageTTFText($im, $si, 0, $x+2, $y, $white, $font, $text);
|  ImageTTFText($im, $si, 0, $x, $y+2, $white, $font, $text);
|  ImageTTFText($im, $si, 0, $x+2, $y+2, $white, $font, $text);
|  ImageTTFText($im, $si, 0, $x+1, $y+1, $black, $font, $text);
|  ImagePNG($im);
| ?
|
| ..from one of the PHP conferences.
|
| php.ttf is the font
|
| php-blank.png is the base image
|
| $text is the text you want to write, and $si is the size of the font
|  __
| / Chris Lambert - [EMAIL PROTECTED]
| |- ICQ #: 16435685 - AIM: ClipperChris
| `- Cell: (401) 743-2786 - http://sms.clambert.org/
| - Original Message -
| From: Mauro Ferreira [EMAIL PROTECTED]
| Newsgroups: php.gtk
| To: [EMAIL PROTECTED]
| Sent: Sunday, July 08, 2001 1:10 PM
| Subject: How to create a button with a icon inside ?
|
|
| Can someone show me a example ?
|
| I'm doing some refinements in an database-oriented app, and show database
| navigation and action buttons with small icons instead of text will do a
lot
| for the visual - and cuts a lot in internationalization too !
|
| If isn't ask for too much, a example of a combined icon+text button too
will
| be great too - some not-so-obvious actions, like data integrity check need
a
| text anyway.
|
| Know how to make this will simplify my work a lot, not to mention the
visual
| aspect.
|
| 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] case sensitive

2001-07-08 Thread Chris Lambert - WhiteCrown Networks

MySQL, on non binary comparisons, is case insensitive. I'm not sure what
your problem is, though. Could you try and explain in a little more detail?

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: prosite [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, July 08, 2001 1:47 PM
Subject: [PHP] case sensitive


| hi,
| is there a little thingy that - put into a script - tells php within a
mysql
| query to not care about cases? problem is a mailing script, that always
| stops, when a mailaddress contains uppercase letters.
| thanks - u.
|
|
| --
| 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] Question about how to do this...

2001-07-08 Thread Chris Lambert - WhiteCrown Networks

Or even better, create a system where you can create new pages without
adding to the switch statement:

?
$page = /home/full/path/to/site/page_includes/.str_replace(.., ,
$page);
if (file_exists($page))
require($page);
?

Note that you _need_ to have the full path, else you're creating a security
issue.

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: Ben Bleything [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; 'PHP General List (E-mail)'
[EMAIL PROTECTED]
Sent: Sunday, July 08, 2001 5:17 PM
Subject: RE: [PHP] Question about how to do this...


| Yup =  Try splitting the pages out into separate files.  I'm betting
| you'll find it easier to work with.
|
| Ben
|
|
| -Original Message-
| From: Chris Cocuzzo [mailto:[EMAIL PROTECTED]]
| Sent: Sunday, July 08, 2001 2:02 PM
| To: PHP General List (E-mail)
| Subject: RE: [PHP] Question about how to do this...
|
| so the switch statement idea works I guess. sounds good.
|
| -Original Message-
| From: Mark Charette [mailto:[EMAIL PROTECTED]]
| Sent: Sunday, July 08, 2001 5:05 PM
| To: Ben Bleything; [EMAIL PROTECTED]; 'PHP General List (E-mail)'
| Subject: Re: [PHP] Question about how to do this...
|
|
| This is probably not a good idea if the data is mostly static. There's
| no
| real reason to use the power of a db engine for something this trivial,
| and
| static serving will be faster than a DB system.
|
| Mark C.
|
| - Original Message -
| From: Ben Bleything [EMAIL PROTECTED]
| To: [EMAIL PROTECTED]; 'PHP General List (E-mail)'
| [EMAIL PROTECTED]
| Sent: Sunday, July 08, 2001 3:59 PM
| Subject: RE: [PHP] Question about how to do this...
|
|
|  Use a database.  With mysql, you can store the text into a table with
|  primary key called 'page' or something like that, and a text field of
|  some sort.
| 
|  Then, do mysql_query(SELECT pagetext FROM website WHERE
| page=$page;);
| 
|  =
| 
|  Dive into it.  It's easier than it looks.
| 
|  Ben
| 
|  -Original Message-
|  From: Chris Cocuzzo [mailto:[EMAIL PROTECTED]]
|  Sent: Sunday, July 08, 2001 1:44 PM
|  To: PHP General List (E-mail)
|  Subject: [PHP] Question about how to do this...
| 
|  hey-
| 
|  so I want to have my site so that the urls are like
| /index.php?page=bio
|  
|  the way I made the index.php so far is just one gigantic switch
|  statement...is there a better way to do it?
| 
| 
|  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]
| 
| 
|
|
| --
| 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] UPS and USPS shipping labels?

2001-07-08 Thread Chris Lambert - WhiteCrown Networks

PHP has _a lot_ of functions, but not enough to cover shipping labels for
UPS... ;-)

You could either use fsockopen() to post the required data, or GD to make
the labels yourself.

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: Mark Bean [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, July 08, 2001 5:44 PM
Subject: [PHP] UPS and USPS shipping labels?


| I know that both UPS and the USPS (US Postal Service) have servers that
| requests can be submitted to which return back formatted shipping labels.
| Does anyone know of any existing functions that work with either of these
| services?
|
| Thank you,
| Mark
| _
| Get your FREE download of MSN Explorer at http://explorer.msn.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] Restoring a Dump File With PHP

2001-07-08 Thread Chris Lambert - WhiteCrown Networks

Click on a database in the left column, and you should see a textarea/file
combination. If the dump is small, you can just paste it in the textarea and
hit submit. Otherwise, choose the file from your local hard drive and it'll
upload it from your browser.

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: Chris Anderson [EMAIL PROTECTED]
To: Chris Lambert - WhiteCrown Networks [EMAIL PROTECTED]
Sent: Sunday, July 08, 2001 5:52 PM
Subject: Re: [PHP] Restoring a Dump File With PHP


| How can phpmyadmin restore from a dump file?
| - Original Message -
| From: Chris Lambert - WhiteCrown Networks [EMAIL PROTECTED]
| To: Chris Anderson [EMAIL PROTECTED]
| Cc: [EMAIL PROTECTED]
| Sent: Saturday, July 07, 2001 4:44 PM
| Subject: Re: [PHP] Restoring a Dump File With PHP
|
|
|  phpMyAdmin - www.phpwizard.net/
| 
|  or...
| 
|  http://www.sitepointforums.com/showthread.php?postid=193539#post193539
| 
|  /* Chris Lambert, CTO - [EMAIL PROTECTED]
|  WhiteCrown Networks - More Than White Hats
|  Web Application Security - www.whitecrown.net
|  */
| 
|  - Original Message -
|  From: Chris Anderson [EMAIL PROTECTED]
|  To: [EMAIL PROTECTED]
|  Sent: Saturday, July 07, 2001 4:25 PM
|  Subject: [PHP] Restoring a Dump File With PHP
| 
| 
|  I created a MySQL dump file (.sql) and I wanted to use it to restore my
|  database. Unfortunately the manual (MySQL) only shows the command line
|  method:
|  mysql database  file.sql
|  I tried this in PHP and it didn't work. Does anyone know how to load the
| sql
|  file into the database through PHP? 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]




Re: [PHP] how do i remove the first 3 characters from a variable?

2001-07-07 Thread Chris Lambert - WhiteCrown Networks

To loop:
unset($temp);
$vars = array(this, that);
foreach ($vars as $var) {
$temp[] = substr($var, 0, 3);
}
$vars = $temp;

Single array element:
$vars = array(this, that);
$vars[1] = substr($vars[1], 0, 3);

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: Doron [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, July 07, 2001 6:18 AM
Subject: Re: [PHP] how do i remove the first 3 characters from a variable?


| and how do i do that?
|
|
| Maxim Maletsky [EMAIL PROTECTED] wrote in message
| news:DC017B079D81D411998C009027B7112A015ED367@EXC-TYO-01...
|  If you loop one then Yes.
| 
| 
|  Sincerely,
| 
|   Maxim Maletsky
|   Founder, Chief Developer
|   PHPBeginner.com (Where PHP Begins)
|   [EMAIL PROTECTED]
|   www.phpbeginner.com
| 
| 
| 
|  -Original Message-
|  From: Doron [mailto:[EMAIL PROTECTED]]
|  Sent: Saturday, July 07, 2001 7:06 PM
|  To: [EMAIL PROTECTED]
|  Subject: Re: [PHP] how do i remove the first 3 characters from a
|  variable?
| 
| 
|  does it work on arrays too??
| 
| 
|  Maxim Maletsky [EMAIL PROTECTED] wrote in message
|  news:DC017B079D81D411998C009027B7112A015ED364@EXC-TYO-01...
|  
|  
|   php.net/substr
|  
|  
|   $var = how do i remove the first 3 characters from a variable;
|   $substract = substr($var, 3);
|   // returns ' do i remove the first 3 characters from a variable'
|  
|  
|  
|   Sincerely,
|  
|Maxim Maletsky
|Founder, Chief Developer
|PHPBeginner.com (Where PHP Begins)
|[EMAIL PROTECTED]
|www.phpbeginner.com
|  
|  
|  
|  
|   -Original Message-
|   From: Doron [mailto:[EMAIL PROTECTED]]
|   Sent: Saturday, July 07, 2001 5:37 PM
|   To: [EMAIL PROTECTED]
|   Subject: [PHP] how do i remove the first 3 characters from a variable?
|  
|  
|   10x
|  
|  
|  
|   --
|   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] chdir() help

2001-07-07 Thread Chris Lambert - WhiteCrown Networks

I'm not sure I know exactly what you want, as the script isn't clear on its
purpose. If you simply want to print out all the images in e:\work\image,
and nothing else, the code would be much simpler.

?
$dir = opendir(e:/work/image);
while ($file_name=readdir($dir)) {
if ($file_name  .  $file_name  ..) {
echo img src='image/$file_name';
}
}
?

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: McShen [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, July 07, 2001 11:38 AM
Subject: [PHP] chdir() help


hi

Currently, i am working in e:\work, and there is a folder named image
under e:\work, so, the path to image is e:\work\image.

I have a script under e:\work, and i wanna display all images under the
folder e:\work\image, I use chdir() to change the directory. but it wouldn't
work. it still displays the images under e:\work. Why is that? Does chdir()
work under win2k pro? here is my script

---
?php


$dir_name = e:\work;
$dir = opendir($dir_name);
while ($file_name=readdir($dir)) {

 if (($file_name!=.  $file_name!=..)) {
  echo $file_name.\nnbsp;nbsp;;

  if (chdir('e:\work\image')) {
   echo current dir is e:\work\image;
  }
  echo IMG SRC=$file_name;
 }
}
closedir($dir);
?
-

Please help me to fix the problem. 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]




Re: [PHP] PHP map?

2001-07-07 Thread Chris Lambert - WhiteCrown Networks

You'd pretty much have to do that pixel by pixel. What exactly do you want
the final application to do...often times there are alternative solutions
derived at by others knowing what you wish to accomplish.

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, July 07, 1979 3:09 PM
Subject: [PHP] PHP map?


| Is there a good script that uses the gd lib to draw a map of the world
| someplace?
|
| Susan
|
|
| _
| 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] mysql_insert_id()

2001-07-07 Thread Chris Lambert - WhiteCrown Networks

I've used integer on many occasions with auto_increment, and have had no
problems. mysql_insert_id() returns the unique identifyer of the last record
inserted with mysql_query(). I'm not sure what MySQL function you're
referencing as an alternative, but you should be fine with an
integer/auto_increment/insert_id()...

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: John Meyer [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, July 07, 2001 4:41 PM
Subject: [PHP] mysql_insert_id()


| I have been reading about this function and I have a question. The PHP
| manual warns about using it if your AUTO_INCREMENT ID field is a BIGINT.
I
| am using type INTEGER.  Am I okay with this one, or should I use the MySQL
| function.
|
| John Meyer
| [EMAIL PROTECTED]
| Programmer
|
|
| If we didn't have Microsoft, we'd have to blame ourselves for all of our
| programs crashing
|
|
| --
| 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] Restoring a Dump File With PHP

2001-07-07 Thread Chris Lambert - WhiteCrown Networks

phpMyAdmin - www.phpwizard.net/

or...

http://www.sitepointforums.com/showthread.php?postid=193539#post193539

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: Chris Anderson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, July 07, 2001 4:25 PM
Subject: [PHP] Restoring a Dump File With PHP


I created a MySQL dump file (.sql) and I wanted to use it to restore my
database. Unfortunately the manual (MySQL) only shows the command line
method:
mysql database  file.sql
I tried this in PHP and it didn't work. Does anyone know how to load the sql
file into the database through PHP? 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]




Re: [PHP] watermarks

2001-07-07 Thread Chris Lambert - WhiteCrown Networks

If the image is on a local server, you could just overlay the watermark with
GD or ImageMagick.

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: Jon Yaggie [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, July 07, 2001 9:36 PM
Subject: [PHP] watermarks


I am afraid I am completely stupid in the way that watermarks
work(researching now).  however I need to know quickly if I can dynamically
apply a watermark to an image using PHP.  Any one know?




Thank You,

Jon Yaggie
www.design-monster.com

And they were singing . . .

'100 little bugs in the code
100 bugs in the code
fix one bug, compile it again
101 little bugs in the code

101 little bugs in the code . . .'

And it continued until they reached 0





-- 
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]