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

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 .

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

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

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

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]

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

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

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

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

Re: [PHP] simple question

2001-07-08 Thread Chris Lambert - WhiteCrown Networks
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

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:

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

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

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 -

Re: [PHP] Restoring a Dump File With PHP

2001-07-08 Thread Chris Lambert - WhiteCrown Networks
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

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:

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:

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]

Re: [PHP] security

2001-07-10 Thread Chris Lambert - WhiteCrown Networks
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

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.

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

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

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,

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

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

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

Re: [PHP] Reading the content.

2001-07-11 Thread Chris Lambert - WhiteCrown Networks
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... |

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

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

[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

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

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

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

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

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'