[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]
AW: [PHP] Image manipulation
http://www.php.net/manual/en/function.getimagesize.php sebastian -Ursprüngliche Nachricht- Von: Kevin Pratt [mailto:[EMAIL PROTECTED]] Gesendet: Dienstag, 10. Juli 2001 19:05 An: [EMAIL PROTECTED] Betreff: [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] Image manipulation
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]
[PHP] How to add a new color to JPEG
Lets say I have a black JPEG-image and I want to add yellow text to it, how can I define the yellow color? According to the manual, you can only get closest value of your desired color by letting the ImageColorClosest() find it. Therefore, if the image is totally black, you can not get the yellow color. I have not found a way to do this though I believe I have tried everything. And yet, I have not found any documents covering this other than PHP-manual. Do you know of a way to do this? Or do you know of other manuals/tutorials covering this issue? Regards, Sumarlidi Einar Dadason SED - Graphic Design -- Phone: (+354) 4615501 Mobile: (+354) 8960376 Fax: (+354) 4615503 E-mail: [EMAIL PROTECTED] Homepage:www.sed.is -- -- PHP General Mailing List (http://www.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 add a new color to JPEG
Could try this: $blue = ImageColorAllocate($image, 0, 0, 255); Substitue blue for yellow and you'll be the appropriate RGB values for the numbers. Jeff -Original Message- From: SED [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 1:27 PM To: [EMAIL PROTECTED] Subject: [PHP] How to add a new color to JPEG Lets say I have a black JPEG-image and I want to add yellow text to it, how can I define the yellow color? According to the manual, you can only get closest value of your desired color by letting the ImageColorClosest() find it. Therefore, if the image is totally black, you can not get the yellow color. I have not found a way to do this though I believe I have tried everything. And yet, I have not found any documents covering this other than PHP-manual. Do you know of a way to do this? Or do you know of other manuals/tutorials covering this issue? Regards, Sumarlidi Einar Dadason SED - Graphic Design -- Phone: (+354) 4615501 Mobile: (+354) 8960376 Fax: (+354) 4615503 E-mail: [EMAIL PROTECTED] Homepage:www.sed.is -- -- PHP General Mailing List (http://www.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: Object oriented if statements
I wonder if someone would be kind enough to explain why, if $record-Subject2 sometimes contains the word posters this echo $record-Subject2; accurately prints the word or words in the field Subject2 from the found record but this if ($record-Subject2 == posters) { echo (PrintFormat1); } else { echo (PrintFormat2); } always returns PrintFormat2 (I'm trying to get the if statement to print format 1 when the field contains posters, and format 2 if it's got anything else in it. It's never empty.) Apologies if you've seen this all before --- Regards John Patterson Patterson Liddle Bath phone fax +44 1225 426722 [EMAIL PROTECTED] www.pattersonliddle.com
RE: [PHP] How to add a new color to JPEG
Thats the problem, if I do that and the color is not used before in the image, I get only the closest match. Note, if I add a yellow pixle into the JPEG-image with Photoshop, save it and try it again, then I can use the yellow for my text. However, I dont want to have the yellow dot in my picture, only a yellow text. SED -Original Message- From: Jeff Lewis [mailto:[EMAIL PROTECTED]] Sent: 10. júlí 2001 17:26 To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] How to add a new color to JPEG Could try this: $blue = ImageColorAllocate($image, 0, 0, 255); Substitue blue for yellow and you'll be the appropriate RGB values for the numbers. Jeff -Original Message- From: SED [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 1:27 PM To: [EMAIL PROTECTED] Subject: [PHP] How to add a new color to JPEG Lets say I have a black JPEG-image and I want to add yellow text to it, how can I define the yellow color? According to the manual, you can only get closest value of your desired color by letting the ImageColorClosest() find it. Therefore, if the image is totally black, you can not get the yellow color. I have not found a way to do this though I believe I have tried everything. And yet, I have not found any documents covering this other than PHP-manual. Do you know of a way to do this? Or do you know of other manuals/tutorials covering this issue? Regards, Sumarlidi Einar Dadason SED - Graphic Design -- Phone: (+354) 4615501 Mobile: (+354) 8960376 Fax: (+354) 4615503 E-mail: [EMAIL PROTECTED] Homepage:www.sed.is -- -- PHP General Mailing List (http://www.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] Apostrophe's
Hi, I have a script that let's me update news on my site but recently whenever I use ' apostrphe's or speechmarks I end up with a slash i.e Jack's becomes Jack\'s From reading here and in the archives it appears I have to edit the script with the stripslashes function. I was wondering if anyone could help me out with this as I haven't a clue where to start editing the script. Many thanks, Dave -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] HTML/PHP's static state problem.
And don't forget the 'no-no' of requiring javascript for basic functionality... Split it onto 2 pages, or have it resubmit to $PHP_SELF with a hidden field (how about a button that says Get Cities ?) and populate from there.. If you're hell-bent on having it auto-populate the second select box, may i request that it also work when JS is turned off? -- Aaron - Original Message - From: Maxim Maletsky [EMAIL PROTECTED] To: Boget, Chris [EMAIL PROTECTED]; 'PHP' [EMAIL PROTECTED]; [EMAIL PROTECTED]; Alexander Deruwe [EMAIL PROTECTED] Sent: Monday, July 09, 2001 10:02 AM Subject: RE: [PHP] HTML/PHP's static state problem. That is why I am saying - loading two pages is cooler then do it all on one. Some people are still scratching the web on 28 and 36 K - those gonna get sick submitting your form. Plus a page view. Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -Original Message- From: Boget, Chris [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 1:51 AM To: 'PHP'; [EMAIL PROTECTED]; Alexander Deruwe Subject: RE: [PHP] HTML/PHP's static state problem. I've done this very thing for a leasing company. I used PHP and MySQL to create a series of arrays in Javascript. When the user clicked on a value in the first combobox I used onClick to call a function which loaded information into the second box. A definite possibility. The only downside being is if there is *alot* of data it'll take a while for the user to DL the page. Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] 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]
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] 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] 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
Re: [PHP] security
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
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]
[PHP] Re: deletion of temp files
[EMAIL PROTECTED] (Anurag Bhalla) wrote: 1. (*) text/plain 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 do you know what the files are named? then you can just use unlink() on each of them? -- Henrik Hansen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] deletion of temp files
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?
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]
Re: [PHP] how to hide dbconnect file if its in publisheddirectory?
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]
[PHP] key length in an array
Hey! I was wondering if anyone knows if there is a limit to how long a string can be when used as a key in an array. Also, what if they are the same up to some point? For example, $string = SomeStringUsedAsKey; $string2 = SomeStringUsedAsKeyAgain; $myArray[$string] = some value; $myArray[$string2] = some other value; Any thoughts on the matter? Thanks! Matthew Hanna
Re: [PHP] how to hide dbconnect file if its in published directory?
Hi Thomas! On Tue, 10 Jul 2001, Thomas David Kehoe wrote: 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'); wai' wai' waitasecond! gosh :) you're including your inc file via web just cause you couldn't figure the path via file system? Well, this way anybody can read it. I rent server space from phpwebhosting.com, so I can't change the PHP settings. I'm about to deploy a B2B there too, and I can give you a hint on the path. your home is ~account == $HOME your web is under $HOME/www/ like starting w/ $ are shell commands now, create a dir inc like that: $ mkdir ~/phpinc put your password file there $ echo ?php define('PASSWORD','@#complicated'); ~/phpinc/password.php move to ~/www/ $ cd ~/www create a file named test.php by editing it with vim or something say: ?php define ('PHPINC',dirname(__FILE__).'/../phpinc'); include (PHPINC.'/password.php'); echo Password is: , PASSWORD; -end edit- The fist line defines where is the directory with PHP files that are out of any visitor sight. Nobody should reach them via web unless you do something silly in your PHP programs (i.e. trust user supplied data) Now request test.php via your browser. It should work. $ lynx http://www.yourdomain.com/test.php Nobody can read your password file, cause it's outside web root (in this case under $HOME/phpinc) cheers, -- teodor -- PHP General Mailing List (http://www.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: include nubie question - need help
Hey Ivo When PHP find an empty string, it returns this message In this case no one has logged in, so, it doesnot find user_name Include: Make sure the path of the file within the () is correct. So if the file is in the same directory, this might be good, but if it's in a different folder, you would need to specify that! Say it would be in /users, then It would be include(/users/login.htm); Try that, might work Rehuel Ivo Stoykov [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello I migrated to php 4.0.5 under windows IIS 5/win2000 AS The following line - if($HTTP_POST_VARS['user_name']) { ... WHATEVER ..} - returns me following error with and without global $HTTP_POST_VARS Warning: Undefined index: user_name in E:\10ioWebSite\sales\login.php on line 99 and the line - include (login.htm); returns following: Warning: Failed opening 'login.htm' for inclusion (include_path='.') in E:\10ioWebSite\sales\login.php on line 131 the php.ini sais: include_path = . both files are in the same dir. Any ideas? thank you -- PHP General Mailing List (http://www.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] mcrypt for win32
Can anyone explain how to install the Win32 version of mcrypt? I've downloaded the Win32 zip file and there are no docs on how to install. 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] stripping white space?
there is a limit of # of root entries. But the number of files per directory is much higher. Running RH6.2 I tried this test: I have an SGI xfs partition that does billion of entries per directory, like reiser, but for an ext2 partition this perl script is for testing for ($index = 1; $index = 2097153; $index++) { open (OUT, file_$index.txt); print OUT Test\n; close (OUT); } after letting it run 4 hours :) it seems to stop at 811626 where I run out of disk space :) oh well -Original Message- From: Christian Reiniger [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 9:52 AM To: Maxim Maletsky; 'Bart Veldhuizen'; [EMAIL PROTECTED] Subject: Re: [PHP] stripping white space? On Tuesday 10 July 2001 11:26, Maxim Maletsky wrote: But you're right, on UNIX systems, if I am not wrong, you cannot hold more then 1024 (?) files in a single directory. AFAIK there's no limit (and certainly not 1024 files), but with most filesystems accesses on large directories are painfully slow. FSs such as ReiserFS however don't slow down noticeably on large directories... -- Christian Reiniger LGDC Webmaster (http://lgdc.sunsite.dk/) I sat laughing snidely into my notebook until they showed me a PC running Linux. And oh! It was as though the heavens opened and God handed down a client-side OS so beautiful, so graceful, and so elegant that a million Microsoft developers couldn't have invented it even if they had a hundred years and a thousand crates of Jolt cola. - LAN Times -- PHP General Mailing List (http://www.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: flat file db
Put it outside webscope, that way it won't be possible to browse the db-file directly... -- Lasse Jon Yaggie [EMAIL PROTECTED] wrote in message 030101c1095b$f235f1a0$0100a8c0@piiimonster">news:030101c1095b$f235f1a0$0100a8c0@piiimonster... i am setting up a flat file database. i want to restrict acess so that users cant view it intentionally or accidentally. i am pretty positive this is a job for htaccess but i am pretty clueless in this area(one of many areas i am clueless in) anyone got a suggestion on a tutorial or another way to protect the db other than htaccess? 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]
[PHP] Problems with PHP_GD.DLL
Sveiki, php-general, Could someone remind me, how to enable graphic in PHP. I have Apache server on Win32. Does someone know any www page where i could read about it. 2001.07.10, antradienis Marius Pertravèius [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: Object oriented if statements
Maybe it contains whitespaces... Have you tried: if (trim($record-Subject2) == posters) { echo (PrintFormat1); } else { echo (PrintFormat2); } -- Lasse Patterson Liddle [EMAIL PROTECTED] wrote in message 00ac01c10967$52da3c40$ec0687d9@patlid">news:00ac01c10967$52da3c40$ec0687d9@patlid... I wonder if someone would be kind enough to explain why, if $record-Subject2 sometimes contains the word posters this echo $record-Subject2; accurately prints the word or words in the field Subject2 from the found record but this if ($record-Subject2 == posters) { echo (PrintFormat1); } else { echo (PrintFormat2); } always returns PrintFormat2 (I'm trying to get the if statement to print format 1 when the field contains posters, and format 2 if it's got anything else in it. It's never empty.) Apologies if you've seen this all before --- Regards John Patterson Patterson Liddle Bath phone fax +44 1225 426722 [EMAIL PROTECTED] www.pattersonliddle.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] Groupwise calendar interface?
Hello All, is there anyway to get a PHP script to talk to Groupwise? I'd like to be able to make some of my web info be able to be entered into a groupwise calendar. I really don't use Gwise but I've had people ask about this. any suggestions are appreciated. chris worth -- PHP General Mailing List (http://www.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] Fetching binaires from an e-mail
Nicklas af Ekenstam wrote: Hi I'm currently trying to rewrite one of my old perl applications to php and everything works great except one thing: I can't figure out how to write a piece of code that will fetch and unencode all binaires, if any, from an e-mail message in an imap stream and return them so that I can save them to disk And rest assured it's not for lack of trying ;-) If anybody here has seen or written something like that and wouldn't mind sharing that code with me I'd be forever grateful. Since I didn't manage to get anywhere with Richard Lynch's tip (thanks though) I figured I'd try asking again and see if there are any takers on this now. Thanks! - Nicklas -- PHP General Mailing List (http://www.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] regex questions
ok, I'm having some continual regex issues and perhaps someone can help me out with this. I've got a series of line of html that I am changing to xhtml and in doing so, each of those lines need to be appended with a / before the closeting bracket. the only pattern that they share is that the end of the line ends with a number, quotes and a closing bracket i.e. 7 I can match that pattern, with .\d but when I try to replace it, I also replace the number at the end, and not just append the line like I want to. can someone show me where I am going wrong Thanks, Jerry Lake Interface Engineering Technician Europa Communications - http://www.europa.com Pacifier Online - http://www.pacifier.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]
RE: [PHP] Removing quotes (was stripping white space?)
My thoughts exactly Comrade --Navid Yar -Original Message- From: Kurt Lieber [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 9:27 AM To: Maxim Maletsky; [EMAIL PROTECTED] Subject: [PHP] Removing quotes (was stripping white space?) Will IE 6 support this non-standard coding style? What about mozilla 1.0? Opera? Konqueror? I think the point is that standards give you a pre-defined style guide that everyone can code to and know that their applications will (or at least should) work across multiple platforms. While removing quotes will work today, it may not tomorrow or the next day. However, by adhering to standards, you have a much better chance of your code not breaking as new browsers get released. An ancillary point is the size savings that you likely get on a single page is 30-40 *bytes*. So you're saving a whopping.01 second of download time. (ok, maybe a bit more, but you get the point) As someone else pointed out, this is a holy war type of thing, so not everyone will agree. However, the points above are why I adhere to coding standards as much as possible. --kurt - Original Message - From: Maxim Maletsky [EMAIL PROTECTED] To: 'Mark Charette' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, July 09, 2001 11:18 PM Subject: RE: [PHP] stripping white space? Here we are talking about our coding styles: When the PHP output is going to be an HTML page, why not getting rid of double quotes with an integer? Even a string is fine, but I just don't feel as confident. I know it makes some very few difference doing so, but I just don't see why not if it is easier for me to develop this way. Give me a valid reason and I'll stop. (I am talking about simple plain HTML, no XML or anything else, just HTML) -maxim maletsky -Original Message- From: Mark Charette [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 3:09 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] stripping white space? From: Maxim Maletsky [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, July 10, 2001 1:05 AM Subject: RE: [PHP] stripping white space? I think it IS a good practice if you only practicing HTML to be outputted by PHP. Why, if you know that it's illegal XHTML and XML, would you ever conclude that it's _good_ practice to break the rules? Saving 20 or 30 bytes/page? If you really want some space saving on many browsers and you're running Apache why not just install the zlib package? Effective throughtput on my (over 100,000) pages on my site jumped 8-fold for those people able to receive and decode zlib-compressed pages, and I didn't have to change anything ... Mark 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] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Authentication
Well, I am using htpasswd files for the passwords but I took all the htaccess or mod_auth directives out of httpsd.conf. I guess I could learn mysql (yeay), and infact, that looks like a real good idea, but the double prompting is due to the fact (I think) that I have the following in the beginning of the index.php file: ?php session_start(); if ( ( !isset( $PHP_AUTH_USER )) || (!isset($PHP_AUTH_PW)) || ( $PHP_AUTH_USER != 'user' ) || ( $PHP_AUTH_PW != 'pass' ) ) { Header( 'HTTP/1.0 401 Unauthorized' ); Header( 'WWW-Authenticate: Basic Realm=Users info' ); echo 'Authorization Required.'; exit; } else { echo 'You are in users page.'; phpinfo(); } ? It seems that for some reason the session is not carrying over with session_register and session_start from the login.php script, which looks like this; ?php session_register(PHP_AUTH_USER); session_register(PHP_AUTH_PW); $auth = false; if (isset ( $PHP_AUTH_USER ) isset ($PHP_AUTH_PW)) { $filename = '/usr/local/apache/conf/htpasswd'; $fp = fopen( $filename, 'r' ); $file_contents = fread( $fp, filesize( $filename ) ); fclose( $fp ); $lines = explode ( \n, $file_contents ); foreach ( $lines as $line ) { list ( $username, $password ) = explode( ':', $line ); if ( $username == $PHP_AUTH_USER ) { $salt = substr( $password , 0 , 2 ); $enc_pw = crypt( $pw, $salt ); if ( $password == $enc_pw ) { $auth = true; break; } } } } if ( ! $auth ) { header( 'WWW-Authenticate: Basic realm=User Area' ); header( 'HTTP/1.0 401 Unauthorized' ); echo 'Authorization Required.'; exit; } else { header( Location: https://192.168.124.219/users/$user/; ); } ? I just want the login.php to setup the PHP_AUTH_USER and PW and then the index.php to read those values, compare them to static requirements and depending on the valuse set up in login.php to either allow or deny. Any suggestions are appreciated. I know websites are secured everyday and you can't get to a page unless you are logged in and if you try it askes for credentials but how is that done? It seems so ordinary but real hard to find out how. Thanks again -Dave Baldwin -Original Message- From: Jack Dempsey Sent: Tue 7/10/2001 11:40 AM To: David Baldwin Cc: Subject:RE: [PHP] Authentication Don't even use those variables, and make sure to call session_start() before anything else...use something of your own like $user and $pass and query your db with those values...it sounds like your using htaccess still because of the double prompting...i'd leave that alone and go straight for sessions and mysql jack -Original Message- From: David Baldwin [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 2:20 PM To: Jack Dempsey Subject: RE: [PHP] Authentication Hey, I am closer now but there is this one problem. I put session_register(PHP_AUTH_USER); and session_register(PHP_AUTH_PW); in the login.php file and session_start(); in the index.php that the client is redirected to, it works in MSIE but not on UNIX/Netscape clients. It still asks for the password twice with netscape. Any suggestions? Thanks again -Dave Baldwin -Original Message- From: Jack Dempsey Sent: Tue 7/10/2001 9:14 AM To: David Baldwin Cc: Subject:RE: [PHP] Authentication Hey dave, May not find exactly what you want, but that's half the fun...best thing, practice sessions...start with simple variables, one to a page, get good with them...then, just add some calls to mysql, checking of the session data at each page, and your authentication scheme gets built... Good luck jack -- PHP General Mailing List (http://www.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] random number problem...
Hi, I've written a picture rotation script, file paths are stored in a file and are called depending on a random number generator.. The problem is that out of 14 possible numbers only 7 are been generated. the code I'm using is... srand ( (double) microtime()*1000); $numbertodisplay = rand(0, (($no_items)-1)); The variable $numbertodisplay only ever takes the values 0,2,4,6,8,10,12. Is there a reason that the only numbers produced are even? Thanks for any help.. James
Re: [PHP] PHP Conference in California
Is it worth going there for the exhibit hall only? I am also interested in the sessions tutorials, but it looks quite expensive to participate in them. By the way, do you live in San Diego? Uri. Aaron Bennett wrote: 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] how to find out the mysql version from php?
several people seem the have the case sensitivity problem regarding different mysql versions - see this extract from the mysql manual: Prior to MySQL Version 3.23.4, REGEXP is case sensitive, and the previous query will return no rows. To match either lowercase or uppercase `b', use this query instead: mysql SELECT * FROM pet WHERE name REGEXP ^[bB]; From MySQL 3.23.4 on, to force a REGEXP comparison to be case sensitive, use the BINARY keyword to make one of the strings a binary string. This query will match only lowercase `b' at the beginning of a name: mysql SELECT * FROM pet WHERE name REGEXP BINARY ^b; is there a way to find out _programmatically_ which version of mysql is running (phpinfo() gives some information, but i don't know how this can be accessed) on the server. thanks in advance, Jakob. PS: please cc me, i am on the very long digest list. -- PHP General Mailing List (http://www.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 add a new color to JPEG
Hmm, I create my image from scratch and haven't tried drawing on an existing pallette. If your start image is always a blank black box you could always create it on the fly... -Original Message- From: SED [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 1:52 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] How to add a new color to JPEG Thats the problem, if I do that and the color is not used before in the image, I get only the closest match. Note, if I add a yellow pixle into the JPEG-image with Photoshop, save it and try it again, then I can use the yellow for my text. However, I dont want to have the yellow dot in my picture, only a yellow text. SED -Original Message- From: Jeff Lewis [mailto:[EMAIL PROTECTED]] Sent: 10. júlí 2001 17:26 To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] How to add a new color to JPEG Could try this: $blue = ImageColorAllocate($image, 0, 0, 255); Substitue blue for yellow and you'll be the appropriate RGB values for the numbers. Jeff -Original Message- From: SED [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 1:27 PM To: [EMAIL PROTECTED] Subject: [PHP] How to add a new color to JPEG Lets say I have a black JPEG-image and I want to add yellow text to it, how can I define the yellow color? According to the manual, you can only get closest value of your desired color by letting the ImageColorClosest() find it. Therefore, if the image is totally black, you can not get the yellow color. I have not found a way to do this though I believe I have tried everything. And yet, I have not found any documents covering this other than PHP-manual. Do you know of a way to do this? Or do you know of other manuals/tutorials covering this issue? Regards, Sumarlidi Einar Dadason SED - Graphic Design -- Phone: (+354) 4615501 Mobile: (+354) 8960376 Fax: (+354) 4615503 E-mail: [EMAIL PROTECTED] Homepage:www.sed.is -- -- PHP General Mailing List (http://www.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] how to find out the mysql version from php?
SELECT version() AS version -Original Message- From: Jakob [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 2:57 PM To: [EMAIL PROTECTED] Subject: [PHP] how to find out the mysql version from php? several people seem the have the case sensitivity problem regarding different mysql versions - see this extract from the mysql manual: Prior to MySQL Version 3.23.4, REGEXP is case sensitive, and the previous query will return no rows. To match either lowercase or uppercase `b', use this query instead: mysql SELECT * FROM pet WHERE name REGEXP ^[bB]; From MySQL 3.23.4 on, to force a REGEXP comparison to be case sensitive, use the BINARY keyword to make one of the strings a binary string. This query will match only lowercase `b' at the beginning of a name: mysql SELECT * FROM pet WHERE name REGEXP BINARY ^b; is there a way to find out _programmatically_ which version of mysql is running (phpinfo() gives some information, but i don't know how this can be accessed) on the server. thanks in advance, Jakob. PS: please cc me, i am on the very long digest list. -- PHP General Mailing List (http://www.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] Mcrypt fails to run
Greetings! I'm running Debian Potato 2.2.19 with php 4.0.4-pl1. I'd recently compiled an Mcrypt.so module, then added the extension line into my php.ini file. After reloading Apache and trying to run any php script which includes ANY mcrypt related function, the code immediately halts and no output is given. There aren't any errors in my log files, so I don't know what could be the problem :(. I'm using libmcrypt 2.4.15 and MCrypt 2.5.7. Best Regards, Dixie Flatline -- PHP General Mailing List (http://www.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] Algorithm for repeating calendar events
Have any of you seen those calendar applications that let you program events that repeat periodically? You can set it to repeat every thursday, every week, every third week, every six months, and so on? I am developing such an application in PHP and I know that the client will ask for this feature. So in thinking ahead of time, I would like to know if any of you has had any experience developing such an application so that you can point me in the right direction. Thanks in advance. -- Ivan R. Quintero E.* (507)228-3477 Aptdo 1263 * (507)228-9105 Balboa, Ancon * 612-1103 Republic of Panama * -- PHP General Mailing List (http://www.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] Algorithm for repeating calendar events
Have any of you seen those calendar applications that let you program events that repeat periodically? You can set it to repeat every thursday, every week, every third week, every six months, and so on? I am developing such an application in PHP and I know that the client will ask for this feature. So in thinking ahead of time, I would like to know if any of you has had any experience developing such an application so that you can point me in the right direction. I just wrote one on the plane back from LinuxTag. I'll get it up on php.net soon and you can steal it from there. -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]
RE: [PHP] How to add a new color to JPEG
hmm. If what I understand from your ImageColorClosest(); function, why don't you just add yellow to the palette? that way it can be found by the function, but isn't used in the image? HTH, James Cox apologies jeff for sending it twice to you :) -Original Message- From: Jeff Lewis [mailto:[EMAIL PROTECTED]] Sent: 10 July 2001 23:00 To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] How to add a new color to JPEG Hmm, I create my image from scratch and haven't tried drawing on an existing pallette. If your start image is always a blank black box you could always create it on the fly... -Original Message- From: SED [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 1:52 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] How to add a new color to JPEG Thats the problem, if I do that and the color is not used before in the image, I get only the closest match. Note, if I add a yellow pixle into the JPEG-image with Photoshop, save it and try it again, then I can use the yellow for my text. However, I dont want to have the yellow dot in my picture, only a yellow text. SED -Original Message- From: Jeff Lewis [mailto:[EMAIL PROTECTED]] Sent: 10. júlí 2001 17:26 To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] How to add a new color to JPEG Could try this: $blue = ImageColorAllocate($image, 0, 0, 255); Substitue blue for yellow and you'll be the appropriate RGB values for the numbers. Jeff -Original Message- From: SED [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 1:27 PM To: [EMAIL PROTECTED] Subject: [PHP] How to add a new color to JPEG Lets say I have a black JPEG-image and I want to add yellow text to it, how can I define the yellow color? According to the manual, you can only get closest value of your desired color by letting the ImageColorClosest() find it. Therefore, if the image is totally black, you can not get the yellow color. I have not found a way to do this though I believe I have tried everything. And yet, I have not found any documents covering this other than PHP-manual. Do you know of a way to do this? Or do you know of other manuals/tutorials covering this issue? Regards, Sumarlidi Einar Dadason SED - Graphic Design -- Phone: (+354) 4615501 Mobile: (+354) 8960376 Fax: (+354) 4615503 E-mail: [EMAIL PROTECTED] Homepage:www.sed.is -- -- PHP General Mailing List (http://www.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
Well the exhibit hall is free... So if you're in town, and have a day or two sick-leave stored up, you might want to go... I'm still unclear if exhibit passes get you into any of the keynotes, but there will be a (heated) debate with MS sr. VP Craig Mundie and RedHat's Michael Tiemann... (http://conferences.oreillynet.com/cs/os2001/view/e_sess/1834) Unless your company will spring for it, i'd skip the PHP seminar.. at $895, its no cheap vacation... I personally live in the area, and am just going to the exhibit.. I'd like to talk with those ActiveState and ArsDigita guys.. I'd also like to see what Roadsend.com is doing with their PHP-SiteManager.. (www.roadsend.com). Jabber.com is also going to be there, and (from what i hear) they're doing some stuff with XML exchanges... -- Aaron - Original Message - From: Uri Even-Chen [EMAIL PROTECTED] To: Aaron Bennett [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, July 10, 2001 2:43 PM Subject: Re: [PHP] PHP Conference in California Is it worth going there for the exhibit hall only? I am also interested in the sessions tutorials, but it looks quite expensive to participate in them. By the way, do you live in San Diego? Uri. Aaron Bennett wrote: 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] Newbie. Help on installation on a Win2K
Newbie. Help on installation on a Win2K im a newbie on this and i want a complete detail on PHP Installation on a Win2K thnx -- PHP General Mailing List (http://www.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 find out the mysql version from php?
Jakob, See if this does what you're looking for. // returns a string with the current mySQL version connecting handled by $dbh. $mysqlver = pos(mysql_fetch_row(mysql_query(SELECT VERSION(),$dbh))); -- Aaron - Original Message - From: Jakob [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 10, 2001 2:56 PM Subject: [PHP] how to find out the mysql version from php? several people seem the have the case sensitivity problem regarding different mysql versions - see this extract from the mysql manual: Prior to MySQL Version 3.23.4, REGEXP is case sensitive, and the previous query will return no rows. To match either lowercase or uppercase `b', use this query instead: mysql SELECT * FROM pet WHERE name REGEXP ^[bB]; From MySQL 3.23.4 on, to force a REGEXP comparison to be case sensitive, use the BINARY keyword to make one of the strings a binary string. This query will match only lowercase `b' at the beginning of a name: mysql SELECT * FROM pet WHERE name REGEXP BINARY ^b; is there a way to find out _programmatically_ which version of mysql is running (phpinfo() gives some information, but i don't know how this can be accessed) on the server. thanks in advance, Jakob. PS: please cc me, i am on the very long digest list. -- PHP General Mailing List (http://www.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 find out the mysql version from php?
or the more simple: mysql_get_server_info($dbh); // where $dbh is optional. http://www.php.net/manual/en/function.mysql-get-server-info.php Note: this is a new function for 4.0.5+. cheers, Aaron - Original Message - From: Aaron Bennett [EMAIL PROTECTED] To: [EMAIL PROTECTED]; Jakob [EMAIL PROTECTED] Sent: Tuesday, July 10, 2001 3:58 PM Subject: Re: [PHP] how to find out the mysql version from php? Jakob, See if this does what you're looking for. // returns a string with the current mySQL version connecting handled by $dbh. $mysqlver = pos(mysql_fetch_row(mysql_query(SELECT VERSION(),$dbh))); -- Aaron - Original Message - From: Jakob [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 10, 2001 2:56 PM Subject: [PHP] how to find out the mysql version from php? several people seem the have the case sensitivity problem regarding different mysql versions - see this extract from the mysql manual: Prior to MySQL Version 3.23.4, REGEXP is case sensitive, and the previous query will return no rows. To match either lowercase or uppercase `b', use this query instead: mysql SELECT * FROM pet WHERE name REGEXP ^[bB]; From MySQL 3.23.4 on, to force a REGEXP comparison to be case sensitive, use the BINARY keyword to make one of the strings a binary string. This query will match only lowercase `b' at the beginning of a name: mysql SELECT * FROM pet WHERE name REGEXP BINARY ^b; is there a way to find out _programmatically_ which version of mysql is running (phpinfo() gives some information, but i don't know how this can be accessed) on the server. thanks in advance, Jakob. PS: please cc me, i am on the very long digest list. -- PHP General Mailing List (http://www.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] stripping white space?
You just gotta love religious wars. How many people know about SGML? HTML is a standard implemented in SGML, and so has many of the possible features of SGML which got excluded for XML such as * ommissible end tags * optional quotes on attribute values that don't contain spaces or quotes * implied attribute values * ommissible attribute names ( eg for things like checked ) Anyway. Not wading in to the debate. Just making an observation At 02:20 10/07/2001 -0500, Navid A. Yar wrote: I guess this is just one of those things where everyone's opinions runs in different directions, yet everyone is entitled to their own. I myself try to respect the standard because of the browser war years which made everyone uncomfortable. Now most browsers are trying to merge into a single standard (thank god). I believe the future to be XML, and I also don't think HTML will ever go away. However, I do believe that HTML will be treated more strict (hence the emergence of XHTML which is based on HTML 4.0 and XML). My suggestion to everyone is to continue using standards and try not to go astray from them, else we know the headaches us developers can face in the future. Sincerely, Navid Yar -Original Message- From: Maxim Maletsky [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 1:06 AM To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED] Subject: RE: [PHP] stripping white space? Yeah, I know that XML requires it. And I also know that it is not a good code practice, but it perfectly works for HTML pages. Browsers compatible with the style sheets have no problems with this code (there's no connection), and if there's any XML to work on the HTML will be rewritten anyway, so there's really no reason to worry about it. Just the size gets lower and typing (escaping in PHP) is easier. I think it IS a good practice if you only practicing HTML to be outputted by PHP. Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -Original Message- From: Navid A. Yar [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 2:40 PM To: [EMAIL PROTECTED] Subject: RE: [PHP] stripping white space? If you do this then those who will want to eventually convert their projects over to XML or XHTML format will have a hard time doing so, because the double quotes around the values of the attributes are required. Also, it's not good code practice. Just something for future reference... -Original Message- From: Maxim Maletsky [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 12:16 AM To: '[EMAIL PROTECTED]'; Kurt Lieber; [EMAIL PROTECTED] Subject: RE: [PHP] stripping white space? I would not be stripping white spaces, but double white spaces into single ' '; for example: $html = ereg_replace([[:space:]]+, ' ', $page); I never tested this, but what I am trying to do is to get all and any blank characters and replace them with one single space. Why? Because I don't want all the words in text to merge together. This should reduce the size. Also here's a tip: remove any double or single quotes in tags surrounding integers. This is compatible enough, but is a bunch of bytes. i.e.: change every IMG SRC=/img/arrow.gif WIDTH=12 HEIGHT=11 BORDER=0 ALT=arrow align=left to IMG SRC=/img/arrow.gif WIDTH=12 HEIGHT=11 BORDER=0 ALT=arrow align=left this example is reduced by 6 bytes. Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -Original Message- From: Mukul Sabharwal [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 2:05 PM To: Kurt Lieber; [EMAIL PROTECTED] Subject: Re: [PHP] stripping white space? Hi, I take that you simply want to remove ALL whitespaces from a data block (variable). you could simply use str_replace( , , $var); --- Kurt Lieber [EMAIL PROTECTED] wrote: Is there a way using PHP to easily strip white space out of an html page as it's being sent to the client. That is to say, the page that we as developers work on is nicely formatted, indented, etc. but when it's sent out to the client, PHP will remove all the extra white space both to obfuscate the code and reduce the size a bit. For anyone who knows Cold Fusion, I'm looking for the PHP equivalent of the Suppress whitespace by default option in the Cold Fusion Server Administrator. (NOTE: I'm not looking for a discussion on the merits of stripping vs. not stripping white space characters or whether or not it really does any good -- I just want to know if it can be done easily using PHP) Thanks. --kurt -- PHP General Mailing List (http://www.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 add a new color to JPEG
How can I add colors to JPEG-palette? I never new It had a special palette (until now :). -Original Message- From: James Cox [mailto:[EMAIL PROTECTED]] Sent: 10. júlí 2001 22:38 To: Jeff@Hyrum. Net Cc: [EMAIL PROTECTED]; Php-General@Lists. Php. Net Subject: RE: [PHP] How to add a new color to JPEG hmm. If what I understand from your ImageColorClosest(); function, why don't you just add yellow to the palette? that way it can be found by the function, but isn't used in the image? HTH, James Cox apologies jeff for sending it twice to you :) -Original Message- From: Jeff Lewis [mailto:[EMAIL PROTECTED]] Sent: 10 July 2001 23:00 To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] How to add a new color to JPEG Hmm, I create my image from scratch and haven't tried drawing on an existing pallette. If your start image is always a blank black box you could always create it on the fly... -Original Message- From: SED [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 1:52 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] How to add a new color to JPEG Thats the problem, if I do that and the color is not used before in the image, I get only the closest match. Note, if I add a yellow pixle into the JPEG-image with Photoshop, save it and try it again, then I can use the yellow for my text. However, I dont want to have the yellow dot in my picture, only a yellow text. SED -Original Message- From: Jeff Lewis [mailto:[EMAIL PROTECTED]] Sent: 10. júlí 2001 17:26 To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] How to add a new color to JPEG Could try this: $blue = ImageColorAllocate($image, 0, 0, 255); Substitue blue for yellow and you'll be the appropriate RGB values for the numbers. Jeff -Original Message- From: SED [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 1:27 PM To: [EMAIL PROTECTED] Subject: [PHP] How to add a new color to JPEG Lets say I have a black JPEG-image and I want to add yellow text to it, how can I define the yellow color? According to the manual, you can only get closest value of your desired color by letting the ImageColorClosest() find it. Therefore, if the image is totally black, you can not get the yellow color. I have not found a way to do this though I believe I have tried everything. And yet, I have not found any documents covering this other than PHP-manual. Do you know of a way to do this? Or do you know of other manuals/tutorials covering this issue? Regards, Sumarlidi Einar Dadason SED - Graphic Design -- Phone: (+354) 4615501 Mobile: (+354) 8960376 Fax: (+354) 4615503 E-mail: [EMAIL PROTECTED] Homepage:www.sed.is -- -- PHP General Mailing List (http://www.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] How to select a line from a web page source?
Hi there: I wanna select a line from a table which is in a php page resulted of a mysql_query So far what i have is a way to search the text from only line and then limit the characters in substr ( ) Thats a really wierd way to do it, i think, and my problem its the page im trying to do its a template wich gives me a difentent line depending of $user i choose. The code i have so far its this: $filename = http://localhost/all.php;; $fcontents = join('', file ($filename)); $first = strstr ($fcontents, $user); $rest = substr ($first, 0, 108); wich works for example if $user = guessit , but if I use $user = Jim doenst work anymore cause jim its a word smaller than guessit, and the limit 108 will give in that case characters of next line heres part of the source of the page where im trying to grab lines : trtdcow/tdtd align=center1/tdtd align=center54/tdtd align=center23/tdtd align=center77/td/tr trtdmer/tdtd align=center2/tdtd align=center44/tdtd align=center0/tdtd align=center44/td/tr trtdluis/tdtd align=center3/tdtd align=center40/tdtd align=center0/tdtd align=center40/td/tr trtdFlix/tdtd align=center4/tdtd align=center38/tdtd align=center7/tdtd align=center45/td/tr trtdRulerman/tdtd align=center5/tdtd align=center35/tdtd align=center0/tdtd align=center35/td/tr trtdJim/tdtd align=center6/tdtd align=center35/tdtd align=center13/tdtd align=center48/td/tr trtdguessit/tdtd align=center7/tdtd align=center35/tdtd align=center24/tdtd align=center59/td/tr trtdwomo/tdtd align=center8/tdtd align=center34/tdtd align=center23/tdtd align=center57/td/tr trtdjay/tdtd align=center9/tdtd align=center4/tdtd align=center4/tdtd align=center8/td/tr As u can see, guessit line is 4 characters longer than jim and the 108 limit wil give me in case of jim line 4 chars of next line. Is there a easier way to select a line? Or if this is the only way, is there a way i can set MySQL fields to have the same chars size, for example 20, even the text if smaller? That would solve the problem too, cause that way all lines would be equal :) ty guys -- PHP General Mailing List (http://www.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 add a new color to JPEG
That's something you would need to do in photoshop. open your image, select save for web, look to the left of the image, you should see some buttons and a black box. you need to click on the black box, select the yellow you want, and then click ok. Then, click the button above the yellow - that will select the eyedropper. Then, go to the color palette opposite. click on the 3rd icon underneath it, which allows you to add eyedropper color to the palette. That should work. mail me if you get stuck, with your image dimensions/copy of image. James -Original Message- From: SED [mailto:[EMAIL PROTECTED]] Sent: 11 July 2001 00:21 To: 'James Cox'; [EMAIL PROTECTED] Subject: RE: [PHP] How to add a new color to JPEG How can I add colors to JPEG-palette? I never new It had a special palette (until now :). -Original Message- From: James Cox [mailto:[EMAIL PROTECTED]] Sent: 10. júlí 2001 22:38 To: Jeff@Hyrum. Net Cc: [EMAIL PROTECTED]; Php-General@Lists. Php. Net Subject: RE: [PHP] How to add a new color to JPEG hmm. If what I understand from your ImageColorClosest(); function, why don't you just add yellow to the palette? that way it can be found by the function, but isn't used in the image? HTH, James Cox apologies jeff for sending it twice to you :) -Original Message- From: Jeff Lewis [mailto:[EMAIL PROTECTED]] Sent: 10 July 2001 23:00 To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] How to add a new color to JPEG Hmm, I create my image from scratch and haven't tried drawing on an existing pallette. If your start image is always a blank black box you could always create it on the fly... -Original Message- From: SED [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 1:52 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] How to add a new color to JPEG Thats the problem, if I do that and the color is not used before in the image, I get only the closest match. Note, if I add a yellow pixle into the JPEG-image with Photoshop, save it and try it again, then I can use the yellow for my text. However, I dont want to have the yellow dot in my picture, only a yellow text. SED -Original Message- From: Jeff Lewis [mailto:[EMAIL PROTECTED]] Sent: 10. júlí 2001 17:26 To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] How to add a new color to JPEG Could try this: $blue = ImageColorAllocate($image, 0, 0, 255); Substitue blue for yellow and you'll be the appropriate RGB values for the numbers. Jeff -Original Message- From: SED [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 1:27 PM To: [EMAIL PROTECTED] Subject: [PHP] How to add a new color to JPEG Lets say I have a black JPEG-image and I want to add yellow text to it, how can I define the yellow color? According to the manual, you can only get closest value of your desired color by letting the ImageColorClosest() find it. Therefore, if the image is totally black, you can not get the yellow color. I have not found a way to do this though I believe I have tried everything. And yet, I have not found any documents covering this other than PHP-manual. Do you know of a way to do this? Or do you know of other manuals/tutorials covering this issue? Regards, Sumarlidi Einar Dadason SED - Graphic Design -- Phone: (+354) 4615501 Mobile: (+354) 8960376 Fax: (+354) 4615503 E-mail: [EMAIL PROTECTED] Homepage:www.sed.is -- -- PHP General Mailing List (http://www.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] How to add a new color to JPEG
Is this only a problem with PHP/GD versions previous to 4.0.6/2.0.1? Does the new ImageCreateTrueColor() function fix this issue? http://www.php.net/manual/en/function.imagecreatetruecolor.php -Original Message- From: James Cox [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 7:28 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] How to add a new color to JPEG That's something you would need to do in photoshop. open your image, select save for web, look to the left of the image, you should see some buttons and a black box. you need to click on the black box, select the yellow you want, and then click ok. Then, click the button above the yellow - that will select the eyedropper. Then, go to the color palette opposite. click on the 3rd icon underneath it, which allows you to add eyedropper color to the palette. That should work. mail me if you get stuck, with your image dimensions/copy of image. James -Original Message- From: SED [mailto:[EMAIL PROTECTED]] Sent: 11 July 2001 00:21 To: 'James Cox'; [EMAIL PROTECTED] Subject: RE: [PHP] How to add a new color to JPEG How can I add colors to JPEG-palette? I never new It had a special palette (until now :). -Original Message- From: James Cox [mailto:[EMAIL PROTECTED]] Sent: 10. júlí 2001 22:38 To: Jeff@Hyrum. Net Cc: [EMAIL PROTECTED]; Php-General@Lists. Php. Net Subject: RE: [PHP] How to add a new color to JPEG hmm. If what I understand from your ImageColorClosest(); function, why don't you just add yellow to the palette? that way it can be found by the function, but isn't used in the image? HTH, James Cox apologies jeff for sending it twice to you :) -Original Message- From: Jeff Lewis [mailto:[EMAIL PROTECTED]] Sent: 10 July 2001 23:00 To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] How to add a new color to JPEG Hmm, I create my image from scratch and haven't tried drawing on an existing pallette. If your start image is always a blank black box you could always create it on the fly... -Original Message- From: SED [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 1:52 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] How to add a new color to JPEG Thats the problem, if I do that and the color is not used before in the image, I get only the closest match. Note, if I add a yellow pixle into the JPEG-image with Photoshop, save it and try it again, then I can use the yellow for my text. However, I dont want to have the yellow dot in my picture, only a yellow text. SED -Original Message- From: Jeff Lewis [mailto:[EMAIL PROTECTED]] Sent: 10. júlí 2001 17:26 To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] How to add a new color to JPEG Could try this: $blue = ImageColorAllocate($image, 0, 0, 255); Substitue blue for yellow and you'll be the appropriate RGB values for the numbers. Jeff -Original Message- From: SED [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 1:27 PM To: [EMAIL PROTECTED] Subject: [PHP] How to add a new color to JPEG Lets say I have a black JPEG-image and I want to add yellow text to it, how can I define the yellow color? According to the manual, you can only get closest value of your desired color by letting the ImageColorClosest() find it. Therefore, if the image is totally black, you can not get the yellow color. I have not found a way to do this though I believe I have tried everything. And yet, I have not found any documents covering this other than PHP-manual. Do you know of a way to do this? Or do you know of other manuals/tutorials covering this issue? Regards, Sumarlidi Einar Dadason SED - Graphic Design -- Phone: (+354) 4615501 Mobile: (+354) 8960376 Fax: (+354) 4615503 E-mail: [EMAIL PROTECTED] Homepage:www.sed.is -- -- PHP General Mailing List (http://www.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
RE: [PHP] deletion of temp files
One way to do this is to create a special directory in htdocs reserved only for temporary files. Add the following line to crontab or a user with permissions to delete: 0 * * * * find /usr/local/apache/sitename/htdocs/specialdir/ -cmin +1440 -exec -rm -f {} Every hour this script will delete all files in specialdir over 24 hours old. Just make sure you use the right directory name :) I like this approach best because it doesn't add a bunch of overhead to any of the session scripts. -Original Message- From: Anurag Bhalla [mailto:[EMAIL PROTECTED]] Sent: Monday, July 09, 2001 2:11 AM To: [EMAIL PROTECTED] 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] Fetching binaires from an e-mail
On Wed, 11 Jul 2001 06:54, Nicklas af Ekenstam wrote: If anybody here has seen or written something like that and wouldn't mind sharing that code with me I'd be forever grateful. Hey, this is just about exactly the opposite of what you're after! http://www.heyes-computing.net/scripts/4/ HTH, Brad -- Brad Hubbard Congo Systems 12 Northgate Drive, Thomastown, Victoria, Australia 3074 Email: [EMAIL PROTECTED] Ph: +61-3-94645981 Fax: +61-3-94645982 Mob: +61-419107559 -- PHP General Mailing List (http://www.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] Upgrade to Apache 1.3.20 on Win2k
Hi all, I have Windows 2000 running Apache 1.3.19. When I run the most recent 1.3.20 windows binary, it says There's already a version of Apache. Go to add/remove programs. Asking me to uninstall it. But, will I lose any mods or confs if I do this and install the new version? And have to modify everything again?.. Or, is there another way? Thanks for your time... -- Julio Nobrega. Yes, another 'Portal-System': http://sourceforge.net/projects/toca -- PHP General Mailing List (http://www.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] Enabling short tags in PHP 4.0.6
I have just installed PHP 4.0.6 on my server and although the php.ini file shows that short open tags should be on, a look at phpinfo() shows they are off and of course the don't work. I have a huge site already developed using short tags and must turn them on. Does anyone know what is wrong? I even configured PHP with the --enable-short-tags option but still no luck. -- --- Shane Lambert, Owner Coulee Web http://www.couleeweb.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] How to add a new color to JPEG
I'm not sure I follow. I know this is how I would do it if I had a GIF-image, but this does not include JPEG. Thats the main issue. The JPEG is saved as an RGB-image, not index colored like GIF, therefore I'm asking about how to add a RGB color to a non-index-color-image (JPEG). Are you sure you are talking about JPEG, not GIF? SED -Original Message- From: James Cox [mailto:[EMAIL PROTECTED]] Sent: 10. júlí 2001 23:28 To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] How to add a new color to JPEG That's something you would need to do in photoshop. open your image, select save for web, look to the left of the image, you should see some buttons and a black box. you need to click on the black box, select the yellow you want, and then click ok. Then, click the button above the yellow - that will select the eyedropper. Then, go to the color palette opposite. click on the 3rd icon underneath it, which allows you to add eyedropper color to the palette. That should work. mail me if you get stuck, with your image dimensions/copy of image. James -Original Message- From: SED [mailto:[EMAIL PROTECTED]] Sent: 11 July 2001 00:21 To: 'James Cox'; [EMAIL PROTECTED] Subject: RE: [PHP] How to add a new color to JPEG How can I add colors to JPEG-palette? I never new It had a special palette (until now :). -Original Message- From: James Cox [mailto:[EMAIL PROTECTED]] Sent: 10. júlí 2001 22:38 To: Jeff@Hyrum. Net Cc: [EMAIL PROTECTED]; Php-General@Lists. Php. Net Subject: RE: [PHP] How to add a new color to JPEG hmm. If what I understand from your ImageColorClosest(); function, why don't you just add yellow to the palette? that way it can be found by the function, but isn't used in the image? HTH, James Cox apologies jeff for sending it twice to you :) -Original Message- From: Jeff Lewis [mailto:[EMAIL PROTECTED]] Sent: 10 July 2001 23:00 To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] How to add a new color to JPEG Hmm, I create my image from scratch and haven't tried drawing on an existing pallette. If your start image is always a blank black box you could always create it on the fly... -Original Message- From: SED [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 1:52 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] How to add a new color to JPEG Thats the problem, if I do that and the color is not used before in the image, I get only the closest match. Note, if I add a yellow pixle into the JPEG-image with Photoshop, save it and try it again, then I can use the yellow for my text. However, I dont want to have the yellow dot in my picture, only a yellow text. SED -Original Message- From: Jeff Lewis [mailto:[EMAIL PROTECTED]] Sent: 10. júlí 2001 17:26 To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] How to add a new color to JPEG Could try this: $blue = ImageColorAllocate($image, 0, 0, 255); Substitue blue for yellow and you'll be the appropriate RGB values for the numbers. Jeff -Original Message- From: SED [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 1:27 PM To: [EMAIL PROTECTED] Subject: [PHP] How to add a new color to JPEG Lets say I have a black JPEG-image and I want to add yellow text to it, how can I define the yellow color? According to the manual, you can only get closest value of your desired color by letting the ImageColorClosest() find it. Therefore, if the image is totally black, you can not get the yellow color. I have not found a way to do this though I believe I have tried everything. And yet, I have not found any documents covering this other than PHP-manual. Do you know of a way to do this? Or do you know of other manuals/tutorials covering this issue? Regards, Sumarlidi Einar Dadason SED - Graphic Design -- Phone: (+354) 4615501 Mobile: (+354) 8960376 Fax: (+354) 4615503 E-mail: [EMAIL PROTECTED] Homepage:www.sed.is -- -- PHP General Mailing List (http://www.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]
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] Blind Carbon Copies? with mail ()???
Hello, I want to send Blind Carbon Copies or Bcc: to a huge 100-200 person mailing list. But the PHP mail() has a to, subject, body format. How can I get a Bcc: in there? Thanks, Marcus -- Marcus James Christian - UNLIMITED - Multimedia Internet Design http://mjchristianunlimited.com Proudly presents the music of CHROMATICUS at http://chromaticus.com and http://artists.mp3s.com/artists/275/chromaticus.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] weird behaviour with (Z = Z)
Yeah... I solved it using ord() in the for clause and chr() in the output... it worked just fine... thanks anyway... At 11:57 10/7/2001 -0400, Jack Dempsey wrote: Perhaps not a great answer, but this issue has been brought up before, and it has to do with the incrementing of a string...search the archives...i think someone had a simple workaround using chr() to get what you want... jack -Original Message- From: Christian Dechery [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 11:45 AM To: [EMAIL PROTECTED] Subject: [PHP] weird behaviour with (Z = Z) Z = Z is true right?? then why this weird thing happens when I have this code: for($letter=A; $letter=Z ; $letter+) echo $letter; it should output A B C D E . W X Y Z right? but it outputs A B C D E ... W X Y Z AA AB ... YW YX YY YZ. why? . [ Christian Dechery ] . Webdeveloper @ Tá Na Mesa! . Listmaster @ Gaita-L . http://www.tanamesa.com.br -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] . Christian Dechery (lemming) . http://www.tanamesa.com.br . Gaita-L Owner / Web Developer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] weird behaviour with (Z = Z)
well... I think u may be wrong if Z is a string and there's nothing bigger or lower than it what is the result of strcmp(Z,a)??? I guarantee you it will not be 0... At 01:09 11/7/2001 +0900, Maxim Maletsky wrote: what??? are you sure it does that to you? You sound so confident that it confuses my knowledge that for loop should be counting integers, not strings (Z is a string and there's nothing bigger or lower it) -maxim maletsky -Original Message- From: Christian Dechery [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 11, 2001 12:45 AM To: [EMAIL PROTECTED] Subject: [PHP] weird behaviour with (Z = Z) Z = Z is true right?? then why this weird thing happens when I have this code: for($letter=A; $letter=Z ; $letter+) echo $letter; it should output A B C D E . W X Y Z right? but it outputs A B C D E ... W X Y Z AA AB ... YW YX YY YZ. why? . [ Christian Dechery ] . Webdeveloper @ Tá Na Mesa! . Listmaster @ Gaita-L . http://www.tanamesa.com.br -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] . Christian Dechery (lemming) . http://www.tanamesa.com.br . Gaita-L Owner / Web Developer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Apostrophe's
On Wed, 11 Jul 2001 03:32, Dave Stewart wrote: Hi, I have a script that let's me update news on my site but recently whenever I use ' apostrphe's or speechmarks I end up with a slash i.e Jack's becomes Jack\'s From reading here and in the archives it appears I have to edit the script with the stripslashes function. I was wondering if anyone could help me out with this as I haven't a clue where to start editing the script. Many thanks, Dave just use stripslashes as you are displaying the values. -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA Real men don't set for stun. -- PHP General Mailing List (http://www.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] weird behaviour with (Z = Z)
that is exactly what I did... it worked perfectly... At 01:40 11/7/2001 +0900, Maxim Maletsky wrote: I would rather go for the following solution: for($i=ord('A'); $i=ord('Z'); $i++) echo chr($i).' '; I know it's same and even slower as it takes two more functions to execute, but at least it is visually closer to what Christian was trying to do. Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -Original Message- From: Jack Dempsey [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 11, 2001 1:13 AM To: 'Maxim Maletsky'; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] weird behaviour with (Z = Z) Try this: ? for($i=65;$i=90;$i++){ $str .= chr($i) . ; } echo $str; ? jack -Original Message- From: Maxim Maletsky [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 12:10 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] weird behaviour with (Z = Z) what??? are you sure it does that to you? You sound so confident that it confuses my knowledge that for loop should be counting integers, not strings (Z is a string and there's nothing bigger or lower it) -maxim maletsky -Original Message- From: Christian Dechery [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 11, 2001 12:45 AM To: [EMAIL PROTECTED] Subject: [PHP] weird behaviour with (Z = Z) Z = Z is true right?? then why this weird thing happens when I have this code: for($letter=A; $letter=Z ; $letter+) echo $letter; it should output A B C D E . W X Y Z right? but it outputs A B C D E ... W X Y Z AA AB ... YW YX YY YZ. why? . [ Christian Dechery ] . Webdeveloper @ Tá Na Mesa! . Listmaster @ Gaita-L . http://www.tanamesa.com.br -- PHP General Mailing List (http://www.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] . Christian Dechery (lemming) . http://www.tanamesa.com.br . Gaita-L Owner / Web Developer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] How to add a new color to JPEG
I have version 4.0.5 so I need to upgrade :) However, I found work around on the PHP-website: -- I experienced the same, but i use following workaround: Create a new Jpeg, Allocate your colours, and copy your original jpg into the new one. then you have all the colours you have allocated in your new pic... I experienced the same, but i use following workaround: Create a new Jpeg, Allocate your colours, and copy your original jpg into the new one. then you have all the colours you have allocated in your new pic... -- So this problem is solved. Thank you for the help. SED -Original Message- From: Matthew Loff [mailto:[EMAIL PROTECTED]] Sent: 10. júlí 2001 23:30 To: 'James Cox'; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] How to add a new color to JPEG Is this only a problem with PHP/GD versions previous to 4.0.6/2.0.1? Does the new ImageCreateTrueColor() function fix this issue? http://www.php.net/manual/en/function.imagecreatetruecolor.php -Original Message- From: James Cox [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 7:28 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] How to add a new color to JPEG That's something you would need to do in photoshop. open your image, select save for web, look to the left of the image, you should see some buttons and a black box. you need to click on the black box, select the yellow you want, and then click ok. Then, click the button above the yellow - that will select the eyedropper. Then, go to the color palette opposite. click on the 3rd icon underneath it, which allows you to add eyedropper color to the palette. That should work. mail me if you get stuck, with your image dimensions/copy of image. James -Original Message- From: SED [mailto:[EMAIL PROTECTED]] Sent: 11 July 2001 00:21 To: 'James Cox'; [EMAIL PROTECTED] Subject: RE: [PHP] How to add a new color to JPEG How can I add colors to JPEG-palette? I never new It had a special palette (until now :). -Original Message- From: James Cox [mailto:[EMAIL PROTECTED]] Sent: 10. júlí 2001 22:38 To: Jeff@Hyrum. Net Cc: [EMAIL PROTECTED]; Php-General@Lists. Php. Net Subject: RE: [PHP] How to add a new color to JPEG hmm. If what I understand from your ImageColorClosest(); function, why don't you just add yellow to the palette? that way it can be found by the function, but isn't used in the image? HTH, James Cox apologies jeff for sending it twice to you :) -Original Message- From: Jeff Lewis [mailto:[EMAIL PROTECTED]] Sent: 10 July 2001 23:00 To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] How to add a new color to JPEG Hmm, I create my image from scratch and haven't tried drawing on an existing pallette. If your start image is always a blank black box you could always create it on the fly... -Original Message- From: SED [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 1:52 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] How to add a new color to JPEG Thats the problem, if I do that and the color is not used before in the image, I get only the closest match. Note, if I add a yellow pixle into the JPEG-image with Photoshop, save it and try it again, then I can use the yellow for my text. However, I dont want to have the yellow dot in my picture, only a yellow text. SED -Original Message- From: Jeff Lewis [mailto:[EMAIL PROTECTED]] Sent: 10. júlí 2001 17:26 To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] How to add a new color to JPEG Could try this: $blue = ImageColorAllocate($image, 0, 0, 255); Substitue blue for yellow and you'll be the appropriate RGB values for the numbers. Jeff -Original Message- From: SED [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 1:27 PM To: [EMAIL PROTECTED] Subject: [PHP] How to add a new color to JPEG Lets say I have a black JPEG-image and I want to add yellow text to it, how can I define the yellow color? According to the manual, you can only get closest value of your desired color by letting the ImageColorClosest() find it. Therefore, if the image is totally black, you can not get the yellow color. I have not found a way to do this though I believe I have tried everything. And yet, I have not found any documents covering this other than PHP-manual. Do you know of a way to do this? Or do you know of other manuals/tutorials covering this issue? Regards, Sumarlidi Einar Dadason SED - Graphic Design -- Phone: (+354) 4615501 Mobile: (+354) 8960376 Fax: (+354) 4615503 E-mail: [EMAIL PROTECTED] Homepage:www.sed.is
RE: [PHP] Blind Carbon Copies? with mail ()???
(Have the To: address be yourself, or a mail account that simply dumps to /dev/null) $to = [EMAIL PROTECTED]; $subject = Subject of Message; $message = blah blah blah... $headers = From: Optional Name of List [EMAIL PROTECTED]\nBCC: [EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED]; mail($to, $subject, $message, $headers); That's how I do it... -Original Message- From: Marcus James Christian [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 9:17 PM To: [EMAIL PROTECTED] Subject: [PHP] Blind Carbon Copies? with mail ()??? Hello, I want to send Blind Carbon Copies or Bcc: to a huge 100-200 person mailing list. But the PHP mail() has a to, subject, body format. How can I get a Bcc: in there? Thanks, Marcus -- Marcus James Christian - UNLIMITED - Multimedia Internet Design http://mjchristianunlimited.com Proudly presents the music of CHROMATICUS at http://chromaticus.com and http://artists.mp3s.com/artists/275/chromaticus.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.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 add a new color to JPEG
I believe the problem is GD previous to version 2.0.1... They could only create images with indexed (256?) colors... I had a PHP script that used GD to resize JPEGs to smaller thumbnails automatically... And it would always reduce them to 256 colors, until I upgraded to PHP 4.0.6, GD 2.0.1, and used ImageCreateTrueColor() --Matt -Original Message- From: SED [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 9:17 PM To: 'James Cox'; [EMAIL PROTECTED] Subject: RE: [PHP] How to add a new color to JPEG I'm not sure I follow. I know this is how I would do it if I had a GIF-image, but this does not include JPEG. Thats the main issue. The JPEG is saved as an RGB-image, not index colored like GIF, therefore I'm asking about how to add a RGB color to a non-index-color-image (JPEG). Are you sure you are talking about JPEG, not GIF? SED -Original Message- From: James Cox [mailto:[EMAIL PROTECTED]] Sent: 10. júlí 2001 23:28 To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] How to add a new color to JPEG That's something you would need to do in photoshop. open your image, select save for web, look to the left of the image, you should see some buttons and a black box. you need to click on the black box, select the yellow you want, and then click ok. Then, click the button above the yellow - that will select the eyedropper. Then, go to the color palette opposite. click on the 3rd icon underneath it, which allows you to add eyedropper color to the palette. That should work. mail me if you get stuck, with your image dimensions/copy of image. James -Original Message- From: SED [mailto:[EMAIL PROTECTED]] Sent: 11 July 2001 00:21 To: 'James Cox'; [EMAIL PROTECTED] Subject: RE: [PHP] How to add a new color to JPEG How can I add colors to JPEG-palette? I never new It had a special palette (until now :). -Original Message- From: James Cox [mailto:[EMAIL PROTECTED]] Sent: 10. júlí 2001 22:38 To: Jeff@Hyrum. Net Cc: [EMAIL PROTECTED]; Php-General@Lists. Php. Net Subject: RE: [PHP] How to add a new color to JPEG hmm. If what I understand from your ImageColorClosest(); function, why don't you just add yellow to the palette? that way it can be found by the function, but isn't used in the image? HTH, James Cox apologies jeff for sending it twice to you :) -Original Message- From: Jeff Lewis [mailto:[EMAIL PROTECTED]] Sent: 10 July 2001 23:00 To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] How to add a new color to JPEG Hmm, I create my image from scratch and haven't tried drawing on an existing pallette. If your start image is always a blank black box you could always create it on the fly... -Original Message- From: SED [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 1:52 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] How to add a new color to JPEG Thats the problem, if I do that and the color is not used before in the image, I get only the closest match. Note, if I add a yellow pixle into the JPEG-image with Photoshop, save it and try it again, then I can use the yellow for my text. However, I dont want to have the yellow dot in my picture, only a yellow text. SED -Original Message- From: Jeff Lewis [mailto:[EMAIL PROTECTED]] Sent: 10. júlí 2001 17:26 To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] How to add a new color to JPEG Could try this: $blue = ImageColorAllocate($image, 0, 0, 255); Substitue blue for yellow and you'll be the appropriate RGB values for the numbers. Jeff -Original Message- From: SED [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 1:27 PM To: [EMAIL PROTECTED] Subject: [PHP] How to add a new color to JPEG Lets say I have a black JPEG-image and I want to add yellow text to it, how can I define the yellow color? According to the manual, you can only get closest value of your desired color by letting the ImageColorClosest() find it. Therefore, if the image is totally black, you can not get the yellow color. I have not found a way to do this though I believe I have tried everything. And yet, I have not found any documents covering this other than PHP-manual. Do you know of a way to do this? Or do you know of other manuals/tutorials covering this issue? Regards, Sumarlidi Einar Dadason SED - Graphic Design -- Phone: (+354) 4615501 Mobile: (+354) 8960376 Fax: (+354) 4615503 E-mail: [EMAIL PROTECTED] Homepage:www.sed.is -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional
[PHP] PHP implementation of associative arrays
is it possible to delete an item from an associative array by using unset(thearray[item1]); ? if the array item is in turn a large object, does this free up the memory that the object was taking up? thanks, -kevin bullaughey -- PHP General Mailing List (http://www.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] How to generate Automatic Reports ?
hi, I want to generate some reports every night at 12.00 o'clock in the night. The reports should get generated automatically without administrator clicking the option. It should run some PHP file which will do the actual report generation stuff, but how to activate this file every nigh ? platform is win2k / IIS / SQL / PHP regards manisha -- PHP General Mailing List (http://www.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 implementation of associative arrays
Yes is it possible to delete an item from an associative array by using unset(thearray[item1]); ? if the array item is in turn a large object, does this free up the memory that the object was taking up? thanks, -kevin bullaughey -- PHP General Mailing List (http://www.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 generate Automatic Reports ?
Well, either use the windows own sheduled task option or get a version of cron for win32. a quick search on google came up with the following: http://www.dwgsoftware.com/help/task_scheduler.html http://www.kalab.com/freeware/cron/cron.htm Manisha wrote: hi, I want to generate some reports every night at 12.00 o'clock in the night. The reports should get generated automatically without administrator clicking the option. It should run some PHP file which will do the actual report generation stuff, but how to activate this file every nigh ? platform is win2k / IIS / SQL / PHP regards manisha -- PHP General Mailing List (http://www.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] http referer
Dear folks I was told that http referer can tell me where the user come from. But it does not work all the time, is there anything else that work better than this? Jack [EMAIL PROTECTED] Love your enemies, it will drive them nuts
[PHP] Variables
Hi, This might sound really simple but plz humour me :) How can I tell if two text variables are equal to one another? If I use.. if($text1 = $text2) { echo The variables are equal; } else { echo The variables are not equal; } then the code in the else state is always printed even if I know for a fact that the variables are equal... Any suggestions? James
Re: [PHP] Variables
Try if($text1 == $text2) { echo The variables are equal; } else { echo The variables are not equal; } notice the change in the if() Tyler On Wed, 11 Jul 2001 03:12:56 +0100 James Bartlett [EMAIL PROTECTED] wrote: Hi, This might sound really simple but plz humour me :) How can I tell if two text variables are equal to one another? If I use.. if($text1 = $text2) { echo The variables are equal; } else { echo The variables are not equal; } then the code in the else state is always printed even if I know for a fact that the variables are equal... Any suggestions? James -- Tyler Longren [EMAIL PROTECTED] Currently Unemployed www.noworkfortyler.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]
RE: [PHP] Blind Carbon Copies? with mail ()???
I'm not sure what you mean by that... You could easily do: $headers = From: Optional Name of List [EMAIL PROTECTED]\nBCC: . $bcc_addresses; (The dot . will concatenate the strings together) If you didn't want the From: Header in there, you could always just: $headers = BCC: . $bcc_addresses; ...or if you had the BCC e-mail addresses in one-dimensional array... $headers = BCC: . implode(,, $bcc_emails_array); Best of luck! -Original Message- From: Marcus James Christian [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 9:48 PM To: Matthew Loff Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Blind Carbon Copies? with mail ()??? Man that is awesome! Can the Bcc in the headers somehow be a $variable ? Thanks, Marcus Matthew Loff wrote: (Have the To: address be yourself, or a mail account that simply dumps to /dev/null) $to = [EMAIL PROTECTED]; $subject = Subject of Message; $message = blah blah blah... $headers = From: Optional Name of List [EMAIL PROTECTED]\nBCC: [EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED]; mail($to, $subject, $message, $headers); That's how I do it... -Original Message- From: Marcus James Christian [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 9:17 PM To: [EMAIL PROTECTED] Subject: [PHP] Blind Carbon Copies? with mail ()??? Hello, I want to send Blind Carbon Copies or Bcc: to a huge 100-200 person mailing list. But the PHP mail() has a to, subject, body format. How can I get a Bcc: in there? Thanks, Marcus -- Marcus James Christian - UNLIMITED - Multimedia Internet Design http://mjchristianunlimited.com Proudly presents the music of CHROMATICUS at http://chromaticus.com and http://artists.mp3s.com/artists/275/chromaticus.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Marcus James Christian - UNLIMITED - Multimedia Internet Design http://mjchristianunlimited.com Proudly presents the music of CHROMATICUS at http://chromaticus.com and http://artists.mp3s.com/artists/275/chromaticus.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Variables
I have tried that also...it still does not want to work... - Original Message - From: Dallas K. To: James Bartlett ; [EMAIL PROTECTED] Sent: Wednesday, July 11, 2001 5:43 AM Subject: Re: [PHP] Variables don't use the quotes if($test1 == $test2) {echo True; } else {echo False; } - Original Message - From: James Bartlett [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 10, 2001 7:21 PM Subject: Re: [PHP] Variables No it doesn't seem to like that either... The weird thing is that if I used instead of = it's fine...although that is not the result I want... - Original Message - From: Tyler Longren To: James Bartlett Cc: [EMAIL PROTECTED] Sent: Wednesday, July 11, 2001 3:21 AM Subject: Re: [PHP] Variables Try if($text1 == $text2) { echo The variables are equal; } else { echo The variables are not equal; } notice the change in the if() Tyler On Wed, 11 Jul 2001 03:12:56 +0100 James Bartlett [EMAIL PROTECTED] wrote: Hi, This might sound really simple but plz humour me :) How can I tell if two text variables are equal to one another? If I use.. if($text1 = $text2) { echo The variables are equal; } else { echo The variables are not equal; } then the code in the else state is always printed even if I know for a fact that the variables are equal... Any suggestions? James -- Tyler Longren [EMAIL PROTECTED] Currently Unemployed www.noworkfortyler.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]
RE: [PHP] Variables
You could always do... If(!strcmp($text1, $text2)) { equal; } else { not equal; } -Original Message- From: James Bartlett [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 10:21 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Variables No it doesn't seem to like that either... The weird thing is that if I used instead of = it's fine...although that is not the result I want... - Original Message - From: Tyler Longren To: James Bartlett Cc: [EMAIL PROTECTED] Sent: Wednesday, July 11, 2001 3:21 AM Subject: Re: [PHP] Variables Try if($text1 == $text2) { echo The variables are equal; } else { echo The variables are not equal; } notice the change in the if() Tyler On Wed, 11 Jul 2001 03:12:56 +0100 James Bartlett [EMAIL PROTECTED] wrote: Hi, This might sound really simple but plz humour me :) How can I tell if two text variables are equal to one another? If I use.. if($text1 = $text2) { echo The variables are equal; } else { echo The variables are not equal; } then the code in the else state is always printed even if I know for a fact that the variables are equal... Any suggestions? James -- Tyler Longren [EMAIL PROTECTED] Currently Unemployed www.noworkfortyler.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] Variables
On 11-Jul-01 James Bartlett wrote: Hi, This might sound really simple but plz humour me :) How can I tell if two text variables are equal to one another? If I use.. if($text1 = $text2) { echo The variables are equal; } else { echo The variables are not equal; } then the code in the else state is always printed even if I know for a fact that the variables are equal... Any suggestions? if ($text1 == $text2) if (0 == strcmp(text1, $text2)) RTM http://www.php.net/manual/en/language.operators.assignment.php http://www.php.net/manual/en/language.operators.comparison.php -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Variables
try this little form example out: --example.php-- ?php if ( (isset($t1))(isset($t2)) ) { if ($t1==$t2) { echo they are equal; } else { echo they are not equal; } } ? html body br br form name=form1 method=post action=?=$PHP_SELF? input type=text name=t1 t1br input type=text name=t2 t2 br input type=submit name=Submit value=Submit /form /body /html -/example.php-- -- PHP General Mailing List (http://www.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] examples of using PHP to control .htaccess
does anyone have/know of any existing code that allows PHP to control .htaccess files? I'm aware of SPHPAT on sourceforge, but I'm looking for something a little more mature. I don't really have a set of requirements other than what I've already stated -- I'm just looking for some examples to help me roll my own. Thanks. --kurt -- PHP General Mailing List (http://www.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] using image place holders in a database field?
Hi all, I want to use image place holders in a mysql field. The field will store a newsletter article and I want to include and display an image in the article. For example I will have: the article text ##image_name## some more article text. I will use str_replace to replace ##image_name## with the html tag to display such as img src='/images/image_name'. But - I don't know how to write the str_replace! Can anyone help? Also, is there are better way to do this?? Can I have images displayed in the middle of text from a field some other way? I also cannot seem to find much on using place holders in a field - but I can see it's advantages. I hope this all makes sense... Regards, Matthew Delmarter -- PHP General Mailing List (http://www.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] using image place holders in a database field?
Hi all, I want to use image place holders in a mysql field. The field will store a newsletter article and I want to include and display an image in the article. For example I will have: the article text ##image_name## some more article text. I will use str_replace to replace ##image_name## with the html tag to display such as img src='/images/image_name'. But - I don't know how to write the str_replace! Can anyone help? Also, is there are better way to do this?? Can I have images displayed in the middle of text from a field some other way? I also cannot seem to find much on using place holders in a field - but I can see it's advantages. I hope this all makes sense... Regards, Matthew Delmarter -- PHP General Mailing List (http://www.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] using image place holders in a database field?
This should do it for you ? $string = Here is a picture ##flowers.jpg## of some flowers; $string = ereg_replace(##(.+)##, img src=\\\1\, $string); print($string); // prints 'Here is a picture img src=flowers.jpg of some flowers' ? The ##(.+)## parts matches any string with two # at the start and the end, the img src=\\\1\ part replaces the ##string## with img src=string. The \\1 is a reference to the string matched with (.+) in the first parameter. '.+' matches any character 1 or more times. - -- - - - Philip Murray [EMAIL PROTECTED] - - -- - - - Original Message - From: Matthew Delmarter [EMAIL PROTECTED] To: PHP Mailing List [EMAIL PROTECTED] Sent: Wednesday, July 11, 2001 3:47 PM Subject: [PHP] using image place holders in a database field? Hi all, I want to use image place holders in a mysql field. The field will store a newsletter article and I want to include and display an image in the article. For example I will have: the article text ##image_name## some more article text. I will use str_replace to replace ##image_name## with the html tag to display such as img src='/images/image_name'. But - I don't know how to write the str_replace! Can anyone help? Also, is there are better way to do this?? Can I have images displayed in the middle of text from a field some other way? I also cannot seem to find much on using place holders in a field - but I can see it's advantages. I hope this all makes sense... Regards, Matthew Delmarter -- PHP General Mailing List (http://www.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] using image place holders in a database field?
Oops. That should've been $string = ereg_replace(##([^#]+)##, img src=\\\1\, $string); - Original Message - From: Philip Murray [EMAIL PROTECTED] To: Matthew Delmarter [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, July 11, 2001 3:57 PM Subject: Re: [PHP] using image place holders in a database field? This should do it for you ? $string = Here is a picture ##flowers.jpg## of some flowers; $string = ereg_replace(##(.+)##, img src=\\\1\, $string); print($string); // prints 'Here is a picture img src=flowers.jpg of some flowers' ? The ##(.+)## parts matches any string with two # at the start and the end, the img src=\\\1\ part replaces the ##string## with img src=string. The \\1 is a reference to the string matched with (.+) in the first parameter. '.+' matches any character 1 or more times. - -- - - - Philip Murray [EMAIL PROTECTED] - - -- - - - Original Message - From: Matthew Delmarter [EMAIL PROTECTED] To: PHP Mailing List [EMAIL PROTECTED] Sent: Wednesday, July 11, 2001 3:47 PM Subject: [PHP] using image place holders in a database field? Hi all, I want to use image place holders in a mysql field. The field will store a newsletter article and I want to include and display an image in the article. For example I will have: the article text ##image_name## some more article text. I will use str_replace to replace ##image_name## with the html tag to display such as img src='/images/image_name'. But - I don't know how to write the str_replace! Can anyone help? Also, is there are better way to do this?? Can I have images displayed in the middle of text from a field some other way? I also cannot seem to find much on using place holders in a field - but I can see it's advantages. I hope this all makes sense... Regards, Matthew Delmarter -- PHP General Mailing List (http://www.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] using image place holders in a database field?
I am going to take this sideways and push my own agenda. :-) In your position, I would consider storing the newsletter text as blobs of XML. Keep it dead simple to start with: !ELEMENT blob (p+) !ELEMENT p (#PCDATA|img) !ELEMENT img (#PCDATA) which would make your article text: blobpthe article text imgimage_name/img some more article text/p/blob and you could then use eregi_replace to turn into HTML: $text = blobpthe article text imgimage_name/img some more article text/p/blob; // Remove the blob tags $text = eregi_replace( [\/]?blob, , , $text ); // Resolve the image element $text = eregi_replace(img([^#]+)/img, img src=\\\1\, $text) Disadvantages: * A little more complex up front Advantages: * You have given yourself room to move if you need to start expanding on what you can do with inline markers At 15:38 11/07/2001 +1200, Matthew Delmarter wrote: Hi all, I want to use image place holders in a mysql field. The field will store a newsletter article and I want to include and display an image in the article. For example I will have: the article text ##image_name## some more article text. I will use str_replace to replace ##image_name## with the html tag to display such as img src='/images/image_name'. But - I don't know how to write the str_replace! Can anyone help? Also, is there are better way to do this?? Can I have images displayed in the middle of text from a field some other way? I also cannot seem to find much on using place holders in a field - but I can see it's advantages. I hope this all makes sense... Regards, Matthew Delmarter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] - Brian White Step Two Designs Pty Ltd - SGML, XML HTML Consultancy Phone: +612-93197901 Web: http://www.steptwo.com.au/ Email: [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] regex questions
On Tuesday 10 July 2001 23:04, Jerry Lake wrote: the only pattern that they share is that the end of the line ends with a number, quotes and a closing bracket i.e. 7 I can match that pattern, with .\d but when I try to replace it, I also replace the number at the end, and not just append the line like I want to. Let the pattern remember it: $bar = preg_replace ('/(\d)/', '\1/', $foo); -- Christian Reiniger LGDC Webmaster (http://lgdc.sunsite.dk/) I saw God - and she was black. -- PHP General Mailing List (http://www.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] ODBC Function equivalent to MySql_Fetch_Array
Hi, I'm trying to write a function (see below) that will provide equivalent functionality between ODBC and MySQL for mysql_fetch_array based upon a preset variable. I've written something that works but A) I'm afraid it might be quite slow; and B) I'm hoping that there is an existing function to do it that I just didn't see! If there isn't an existing function ... how do I go about requesting it for a future release? One of the key things I was looking for was the field names in the associative array (Note: I already had ... and commented out ... the odbc_fetch_into function ... nice but not quite what I was wanting) Thanks. - function db_fetch_array($result) { global $db_type, $db_connection; if ($db_type == 1) : return mysql_fetch_array($result); else: $i = 0; $fCount = odbc_num_fields($result); $result_array = array(); if (odbc_fetch_row($result)) : while ($i $fCount) $i++; $fName = odbc_field_name($result, $i); $result_array[$fName] = odbc_result($result, $i); } // odbc_fetch_into ($conn, $result_array); return $result_array; else: return false; endif; endif; -- PHP General Mailing List (http://www.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: GetImageSize
For some reason, at random and without warning, the function just seems to stop working and does nothing but wait and timeout at 80 seconds. When you go to the page say www.somedomain.com it just waits and does not load anything for 80 seconds, and when it does, the images that use GetImageSize do not load. Example of the code perhaps? I've never had a problem with that function. -Adam -- PHP General Mailing List (http://www.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] What the heck is this
I've seen this around alot ($a-$z) and i'm woundering what it is and what it does. I'm specifcally talking about the arrow thingy -. I've never seen it before so i was kinda curious. thanks -Adam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]