[PHP] Set the background color of an image with GD

2003-10-30 Thread Cranky
Hello, I have a stranger behaviour of the function imagecolorallocate. Normally, this function is used to create a color for an image and the first call to this function set the background color of the image. So here is my code : [snip]...[/snip] $im = imagecreate(15, 15); $white = imagecolorall

Re: [PHP] Change text size with GD

2003-10-27 Thread Cranky
I have this error message : Warning: ImageFontLoad: error reading font in Thanks for your help Chris Neale wrote: I use the function imageTTFtext allows you to specify a string with a font and a font point size. Hope that helps. Chris -Original Message- From: Cranky [mailto:[EMAIL P

[PHP] Image created with GD does not appear

2003-10-27 Thread Cranky
Hello, I generate an image with GD in the file generate_image.php require('config.php') require('functions.php'); require('secure.php'); header('Content-Type: image/png'); $im = imagecreate(15, 15); // generation of the image // ... imagepng($im); imagedestroy($im); ?> But when I call this page

[PHP] Change text size with GD

2003-10-27 Thread Cranky
Hello, I would like to draw text in a rectangle on an image. The text must take all the place in the rectangle. The trouble is that with imagestring(), there are only 5 fonts (1, 2, 3, 4, 5) and the bigger (5) is still too smaller for my rectangle. Is there another way to change the size of the t

Re: [PHP] Lifetime with cookie-less sessions

2003-09-24 Thread Cranky
I just come to do some test this afternoon and here are the results. Now : '.date('H:i:s'); ?> Reload And here are the results : session.use_cookie = 0; session.gc_maxlifetime = 30; // 30 seconds session.gc_probability = 100; // 100% => the gc is always called On page 2, I have : Array ( [begi

[PHP] Lifetime with cookie-less sessions

2003-09-24 Thread Cranky
Hello, Is it possible to determine a lifetime for the session in the case of a cookie-less sessions ? Thanks for your help. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: mysql_close();

2003-03-21 Thread Cranky
By this way, you always reopne a new connection at the end of all of your page You just have to use somthing like this... if($connection) @mysql_close($connection); But as it was said, you are not *obliged* to close the connection, PHP will close it himself. But you can also close your

Re: [PHP] register_variables

2003-03-18 Thread Cranky Kong
The problem must certainly come from the register_global turn to off Check this value in your php.ini file "Samug" <[EMAIL PROTECTED]> a écrit dans le message de news: [EMAIL PROTECTED] > No it's not. > It's a script called LinksCaffe > . > In

[PHP] Re: PHP url variables

2003-03-14 Thread Cranky Kong
Have a look at the parameter register_global in your php.ini By default in the recent version of PHP, this parameter is set by default to off for security reason. So if you want to use $id, you just have to set this parameter to on "Stephen" <[EMAIL PROTECTED]> a écrit dans le message de news: [E

Re: [PHP] javascript

2003-03-07 Thread Cranky Kong
page is very fast. "Marek Kilimajer" <[EMAIL PROTECTED]> a écrit dans le message de news: [EMAIL PROTECTED] If the user is disabled, the user will be bothered to wait till the page reloads, sure there MUST be server side check Cranky Kong wrote: >And what are you doing if th

Re: [PHP] javascript

2003-03-07 Thread Cranky Kong
I always test the data server side, never on the client. The set up of the browser can be changed by the client and so a guy whi want to create problem can disable JS. On the server, the visitor of your site can not changed the set up... So you can also check both client side and server side but p

Re: [PHP] javascript

2003-03-07 Thread Cranky Kong
And what are you doing if the javascript is not enabled in the browser of the client ??? There will be no verification and the user can enter what he want in the field of your form And it's a bit dangerous for your DB if your insert data in a DB... "Marek Kilimajer" <[EMAIL PROTECTED]> a écri

[PHP] global var or passing a parameter in classes ?

2003-03-05 Thread Cranky Kong
Hello, here is my problem : I have a class A and I instanciate this class at the beginninf of my script. I have another class B and in some functions of this class B, I need to access the instance of the class A. So in the functions of the class B, to access the class A, is it better to receive a

Re: [PHP] php as php3 perhaps with htaccess

2003-03-03 Thread Cranky
Thanks for this reply. But I can not use the mod-rewrite because my site is on a shared hosting. Another idea ? Thanks "Ernest E Vogelsinger" <[EMAIL PROTECTED]> a écrit dans le message de news: [EMAIL PROTECTED] > At 10:21 03.03.2003, Cranky said: > ---

[PHP] php as php3 perhaps with htaccess

2003-03-03 Thread Cranky
Hello, I have a website and all my files are *.php3 I would like to change the extensions of all files to *.php My problem is for the search engine and links to my site. Because the site is well referenced in the search engine with files liek *.php3 So if I rename all files in .php, the links in

[PHP] Variables VS constantes

2003-02-28 Thread Cranky
Hello, I would like to know if in a config file for example, if it was better to use variables or constantes ? Is it a big difference of performance or in memory used ? And the same question about the translation of a site. I would like to translate my site in many langages. So I want to create on