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
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 .
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
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
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
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]
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
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
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
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]
|- 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
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:
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
*/
-
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
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 -
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
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:
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:
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]
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
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.
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
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
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,
?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
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
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
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...
|
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
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
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
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
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
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
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
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'
36 matches
Mail list logo