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




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]