[PHP] Manage link.

2003-12-18 Thread Vincent M.
Hello,

Is there any way to manage links in an array and transform them.
For example, I have this text in the database:
---
Software  Support Media, produc-ers of the International PHP 
Conference, are pleased to announce a new monthly version of their print 
publication. For more information, you can go here: http://www.google.com
Thanks.
---

And transform this text to:
---
Software  Support Media, producers of the International PHP Conference, 
are pleased to announce a new monthly version of their print 
publication. For more information, you can go here: a 
href=\http://www.google.com\;url/a
Thanks.
--

Thanks,
Vincent.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Manage link.

2003-12-18 Thread Vincent M.
This one is perfect:
$text = preg_replace( /(?!a 
href=\)((http|ftp)+(s)?:\/\/[^\s]+)/i, a 
style=\text-decoration:underline\ href=\\\0\URL/a, $text );

:D

Evan Nemerson wrote:

On Thursday 18 December 2003 01:37 pm, Vincent M. wrote:

Hello,

Is there any way to manage links in an array and transform them.
For example, I have this text in the database:


php.net/preg_replace

---
Software  Support Media, produc-ers of the International PHP
Conference, are pleased to announce a new monthly version of their print
publication. For more information, you can go here: http://www.google.com
Thanks.
---
And transform this text to:
---
Software  Support Media, producers of the International PHP Conference,
are pleased to announce a new monthly version of their print
publication. For more information, you can go here: a
href=\http://www.google.com\;url/a
Thanks.
--
Thanks,
Vincent.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Function disabled.

2003-11-21 Thread Vincent M.
Hello,

How to test if a function has been disabled. I tried doing this:
if(function_exists(rmdir)) {
  echo rmdir Function exists ;
} else {
  echo rmdir Function DOES NOT exists ;
}
So the test says that the function exists, but if we use  it, I get:
rmdir() has been disabled for security reasons
How to test if the function has been disabled ?

Thanks.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Usort an array.

2003-11-20 Thread Vincent M.
Hello,

I have an array like that:
$return[0][photo] = monuments_01.jpg
$return[1][photo] = monuments_00.jpg
$return[2][photo] = monuments_03.jpg
$return[3][photo] = monuments_02.jpg
$return[4][photo] = monuments_04.jpg
If I use the sort function:
sort($return) ;
I get:
$return[0][photo] = monuments_00.jpg
$return[1][photo] = monuments_01.jpg
$return[2][photo] = monuments_02.jpg
$return[3][photo] = monuments_03.jpg
$return[4][photo] = monuments_04.jpg
Fine, but I'd like this result too:
$return[0][photo] = monuments_04.jpg
$return[1][photo] = monuments_03.jpg
$return[2][photo] = monuments_02.jpg
$return[3][photo] = monuments_01.jpg
$return[4][photo] = monuments_00.jpg
And usort does not work, which function should I use ?

Thanks,
Vincent.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] rmdir withour rmdir function.

2003-11-17 Thread Vincent M.
Hello,

I can't use the function rmdir:
 Warning: rmdir() has been disabled for security reasons
But I do need to delete a directory with php. How can I do ? Is there 
any way to delete an empty directory without using the rmdir function ?

I tried to use the unlink function on the directory, but It does not 
work, it only works for files...

Thanks,
Vincent.
PS: list of disabled functions:
get_current_user, php_uname, putenv, set_time_limit, getmyuid, getmypid, 
dl, mail, ini_alter, ini_restore, ini_set, exec, passthru, system, 
popen, leak, mysql_list_dbs, listen, chown, chmod, chgrp, diskfreespace, 
rmdir, realpath, tmpfile, link, imap_mail, email, mb_send_mail

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] rmdir withour rmdir function.

2003-11-17 Thread Vincent M.
I'm not lucky, there is no ftp access to the server. This can sound a 
little strange, but there is no... :(

Marek Kilimajer wrote:
ftp_rmdir()

Vincent M. wrote:

Hello,

I can't use the function rmdir:
 Warning: rmdir() has been disabled for security reasons
But I do need to delete a directory with php. How can I do ? Is there 
any way to delete an empty directory without using the rmdir function ?

I tried to use the unlink function on the directory, but It does not 
work, it only works for files...

Thanks,
Vincent.
PS: list of disabled functions:
get_current_user, php_uname, putenv, set_time_limit, getmyuid, 
getmypid, dl, mail, ini_alter, ini_restore, ini_set, exec, passthru, 
system, popen, leak, mysql_list_dbs, listen, chown, chmod, chgrp, 
diskfreespace, rmdir, realpath, tmpfile, link, imap_mail, email, 
mb_send_mail

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Unzip a file.

2003-11-16 Thread Vincent M.
Kim Steinhaug wrote:
on phpclasses.org there is a ZIP class that does all you need to do.
Havnt got the time to give you the url right now, but look there.
All I found are classes to extract tar/gzip files:
http://www.phpclasses.org/search.html?words=zipgo_search=1restrict=method=andsort=score
Is there any I couldn't see ?

Thanks,
Vincent.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Unzip a file.

2003-11-15 Thread Vincent M.
Hello,

Is there an easy way to unzip a zipped file which contains files 
(images), using a function from the zlib or any.
To something like that:

exec(unzip zipfile.zip -d /path/to/images) ;

But without using the exec function.

Thanks,
Vincent.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] ls as function.

2003-11-13 Thread Vincent M.
John Nichel wrote:
Chris Shiflett wrote:

--- Marek Kilimajer [EMAIL PROTECTED] wrote:

So, i am looking for a function which return the result of the unix 
shell command: ls mydir/name*


www.php.net/glob


I think you read that question wrong, or else I am. :-)

Try the second user note on this page:

http://www.php.net/manual/en/ref.filesystem.php

Hope that helps.

Chris


I think you read it right, and I (along with the other poster) read it 
wrong.  I first thought he wanted to execute ls without using php's exec 
function...but rereading it, I don't think he was looking for my response.

That's what I wanted, (he wanted to execute ls without using php's exec 
function).
So Glob is the function I was looking for, unfortunatly it has been 
available only since the 4.3.0 !
Anyway, if there is a wish, there is a way ;)

Thanks.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] ls as function.

2003-11-12 Thread Vincent M.
Hello,

Is there any function to do:
$thumb = exec(ls $dir/name*) ;
without using the exec function and without making a while:
$direc_src_obj = dir($dir) ;
while($entry=$direc_src_obj-read()) {
  ...
}
So, i am looking for a function which return the result of the unix 
shell command:
ls mydir/name*

Thanks,
Vincent.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Calling a function.

2003-09-12 Thread Vincent M.
Hello,

Is there any way to call a function with a variable inside the call. ie:

 if($preferences != ) {
   dis_display$$preferences() ;
 }
If $preferences = menus this will call the function dis_displaymenus()

Thanks,
Vincent.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Downloading a file.

2003-06-11 Thread Vincent M.
Hello,

To download a file after a form like that:
form name=download action=downloadit.php method=post
Do you want to download?
/form
If he wants to download, in the file downloadit.php, there is:
header(Content-type: application/octet-stream\n);
header(Content-Disposition: attachment; filename=mysoft-1.0-truc.zip);
header('Cache-Control: public');
header(Content-transfer-encoding: binary\n);
header(Content-length:  . filesize($path) . \n);
$fp=fopen($path, r);
fpassthru($fp);
But, with IE, it saves the file with [] as:
mysoft-1.0[1]-truc.zip
And with Netscape 7.x, it saves the file with the .php extension:
mysoft-1.0-truc.zip.php
Does anyone know what to do to make it saved as: mysoft-1.0-truc.zip

And I would like to display a page telling Thanks for download or 
something...but if I had to the end:
header(Location: http://www.mywebsite.com/thanks.html;) ;
I does not work :(

Does anyone know how change the location and is there is anyway to know 
if the download has been perfomed 'till the end...

Thanks,
Vincent.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] How to secure a download ?

2003-05-31 Thread Vincent M.
Hello,

Is there any way to launch a download of a Zip file to the user without 
a link. The user must not know where the file is on the server.

The transfert of the file must be made by a php file with special 
headers, no ?

  header(Content-type: zip); or something...

Thanks.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] So many functions!

2003-04-02 Thread Vincent M.
Hello,

There so many functions in php that I can't find the one I need. I have 
a table like that:

$lang[english][category]= Category ;
$lang[english][backpage]= Go to the back page ;
$lang[english][nextpage]= Go to the next page ;
...
$lang[francais][category]= Catégorie ;
$lang[francais][backpage]= Aller à la page précédente ;
$lang[francais][nextpage]= Aller à la page suivante ;
...
And I need to extract english and francais.
As it, when I will add another language such as espanol, it will be
automatic...
Any idea ?
Thanks,
Vincent.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Protecting Code source.

2003-03-27 Thread Vincent M.
Hello,

I'd like to sell an application to 24$ US and I have to protect my 
source code.
But I don't want to make my customer install anything on the server to 
be able to run my application.
So the Zend encoder seems good for me:
http://www.zend.com/store/products/zend-encoder.php
Or, make it easy for your customers to run Zend-encoded files by 
bundling your application with the Zend Optimizer freeware.

The only trouble is the price (960$), it's a little expensive for the 
student I am :-/

Does anyone know any other less expensive way to protect my source code ?

Thanks,
Vincent.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Protecting Code source.

2003-03-27 Thread Vincent M.
John Wards wrote:
On Thursday 27 Mar 2003 7:31 pm, Vincent M. wrote:

The only trouble is the price (960$), it's a little expensive for the
student I am :-/
Does anyone know any other less expensive way to protect my source code ?


http://www.ioncube.com/

They have a web based version that you do on a per file basis and is much 
cheaper for small jobs

Cheers
John Wards
SportNetwork.net
The problem is that:
http://www.ioncube.com/loader_download.php :
The loader can be installed by either adding a single line to the 
php.ini file

I don't want my customers to have to edit the php.ini and what's more, 
some of them don't have an access to it...

:-(

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Test the server.

2003-03-22 Thread Vincent M.
Sebastian wrote:
put this in a .php file:
?php phpinfo(); ?
it'll tell you what OS, (usually)
check if safe mode is on.. if it's on then usually you can't exec
anything.
cheers,
- Sebastian
Yes I know but my aim is to make a php script which checks automaticly 
if the php and the shell functions I need are available.

Vincent.



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Test the server.

2003-03-21 Thread Vincent M.
Hello,

Is there anyway to check these two things:
 - If the server is an Unix server.
 - If a command is available on the server.
For exemple, I need to test if the shell command unzip is avalaible to do:
exec(unzip ...something...) ;
So I can test if exec is available doing:
if(function_exists(exec)) {
  ...
}
But how to test if a shell command is available on the server and if the 
server is an Unix-like server ?

Thanks.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Zip Way of life.

2003-03-19 Thread Vincent M.
Hello,

I'd like to uncompress to the Hard disk a zip file send by the browser.

At this time I do this:

function uncompresszip($zipfile) {
  copy($zipfile, dirname($_SERVER['PATH_TRANSLATED'])./zip/zipfile.zip) ;
}
But I do not understand how to uncompress the zip file, I tried for exemple:
$retour = 
readgzfile(dirname($_SERVER['PATH_TRANSLATED'])./zip/zipfile.zip);

But as mentionned in the php doc it outputs the content of the zip file 
in the browser :-(

How to uncompress a zip file in a directory ? I just want all the files 
which are in the zip file...

Thanks,
Vincent.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Zip Way of life.

2003-03-19 Thread Vincent M.
Marek Kilimajer wrote:
readgzfile is for *.gz files.
Either use zip file functions (rarely supported) or PclZip 
(http://www.phpconcept.net/pclzip/index.en.php)

No, it works with .zip files too, I just don't know how to manage it :-(



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Zip Way of life.

2003-03-19 Thread Vincent M.
David T-G wrote:
Vincent, et al --

...and then Vincent M. said...
% 
% Marek Kilimajer wrote:
% readgzfile is for *.gz files.
...
% No, it works with .zip files too, I just don't know how to manage it :-(

You mentioned wanting the files (note the plural) in the zip file.
AFAIK gunzip can unzip an archive containing a single file, but if you
have more than one in there then you need to use an actual unzip tool
(like, say, unzip :-)
While a class or a built-in command might be nice, if you just want to
get them out then a simple system call might be the easiest way to go.
HTH  HAND

:-D
Yes but gunzip does not work when there are more than one file in the 
zip file and unzip is not installed by on Unix servers. :-(

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Zip Way of life.

2003-03-19 Thread Vincent M.
Daevid Vincent wrote:
You could use the exec() or shell_exec() and just do it via command line
method...
Yes but gunzip does not work when there are more than one file in the 
zip file and unzip is not installed by default on Unix servers. :-(





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Searching for a file.

2003-03-17 Thread Vincent M.
Hello,

I am looking for a way to search a file knowing the beginig of his name. 
For exemple, I know that the file I am looking for is:
montreal_13_120.jpg
But I just know:
montreal_13
And I can't know _120.jpg

So at this time I did this:
$dirthumbs = $dir./thumbs ;
$direc_src_obj2 = dir($dirthumbs) ;
while($entry=$direc_src_obj2-read()) {
  if( substr($entry, 0, 15) == $begining){
$return[$i][thumb] = $entry ;
break ;
  }
}
It works but it's not enough fast :-(
For resume, is there a way to do something like that:
ls montreal_13*
without using the passthru function, I am looking for a native php 
function doing ls $mychar*

Thanks,
Vincent.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] HTTP_POST_VARS empty!

2003-03-12 Thread Vincent M.
Hello,

I don't understand this code empty my HTTP_POST_VARS variable:
if ((get_magic_quotes_gpc() == 1)) {
  switch ($REQUEST_METHOD) {
  case POST:
while (list ($key, $val) = each ($HTTP_POST_VARS)) {
  $$key = stripslashes($val);
}
break;
  case GET:
while (list ($key, $val) = each ($HTTP_GET_VARS)) {
  $$key = stripslashes($val);
}
break;
  }
}
This script is usefull to simulate get_magic_quotes_gpc to 0 but if I do 
 it it empty my HTTP_POST_VARS and this code does not work:
while(list ($key, $val) = each($HTTP_POST_VARS)) {
  echo $key = $valbr;
}
echo Here we are...!!!... ;

It displays, Here we are...!!!... but nothing at all for $key and for $val

How should I do to simulate get_magic_quotes_gpc to 0 without emptying 
HTTP_POST_VARS ?

Thanks,
Vincent.
PS: If I delete the code ...(get_magic_quotes_gpc() == 1)...it works...

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: HTTP_POST_VARS empty!

2003-03-12 Thread Vincent M.
Vincent M. wrote:
Vincent M. wrote:

Hello,

I don't understand this code empty my HTTP_POST_VARS variable:
if ((get_magic_quotes_gpc() == 1)) {
  switch ($REQUEST_METHOD) {
  case POST:
while (list ($key, $val) = each ($HTTP_POST_VARS)) {
  $$key = stripslashes($val);
}
break;
  case GET:
while (list ($key, $val) = each ($HTTP_GET_VARS)) {
  $$key = stripslashes($val);
}
break;
  }
}
This script is usefull to simulate get_magic_quotes_gpc to 0 but if I 
do  it it empty my HTTP_POST_VARS and this code does not work:
while(list ($key, $val) = each($HTTP_POST_VARS)) {
  echo $key = $valbr;
}
echo Here we are...!!!... ;

It displays, Here we are...!!!... but nothing at all for $key and 
for $val

How should I do to simulate get_magic_quotes_gpc to 0 without emptying 
HTTP_POST_VARS ?

Thanks,
Vincent.
PS: If I delete the code ...(get_magic_quotes_gpc() == 1)...it works...

ok,
It seems to empty the HTTP_POST_VAR variable when we parse it with
while(list ($key, $val) = each($HTTP_POST_VARS)) {
...
}
So I can't do this while 2 times :-( and I need to do it several times!
Does anyone know how to parse $HTTP_POST_VARS whithout emptying this 
variable ?

Thanks.

ok, reset($HTTP_POST_VARS) is my friend ;-)

++

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Easy Way.

2003-03-09 Thread Vincent M.
Hello,

Is there an easy way to change an integer to a 5 caracters string.
For example:
$i = 3 ;
$j = 110 ;
After having changed them:
$i = 3 ;
$j = 00110 ;
Is there a php function to do so instead of doing this:
  if( ($i0)($i10)) {
$i = .$i ;
  } else if( ($i9)($i100)) {
$i = 000.$i ;
  } else if( ($i99)($i1000)) {
$i = 00.$i ;
  } etc...
Thanks :-)

Vincent.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Easy Way.

2003-03-09 Thread Vincent M.
Jason Sheets wrote:
Hello,

Use str_pad, the manual page is available at http://www.php.net/str_pad,
a short example would be:
$i = 3;
$i = str_pad($i, 5, 0, STR_PAD_LEFT);
This function is described in the PHP manual in the string functions
section, the manual is an excellent place to go first when questions
such as this arise.
Yes I know, but it's not so easy to find to right function I need there 
are so many... ;-)

Thanks.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Global VARS.

2003-03-07 Thread Vincent M.
Hello,

To get ride of magic_quotes I do:
function no_magicquotes() {
  global $HTTP_GET_VARS ;
  global $HTTP_POST_VARS ;
  global $HTTP_COOKIE_VARS ;
  if (get_magic_quotes_gpc()) {
   // Overrides GPC variables
  for (reset($HTTP_GET_VARS); list($k, $v) = each($HTTP_GET_VARS); )
   $$k = stripslashes($v);
   for (reset($HTTP_POST_VARS); list($k, $v) = each($HTTP_POST_VARS); )
 $$k = stripslashes($v);
  for (reset($HTTP_COOKIE_VARS); list($k, $v) = each($HTTP_COOKIE_VARS);)
 $$k = stripslashes($v);
 }
}
And it seems to work, But i have have a file like that:
$VAR_mailadmin = [EMAIL PROTECTED] ;
$VAR_urlgallery= http://www.siova.net/paris2; ;
$VAR_categories[0][title] = Montréal by Night ;
$VAR_categories[0][name]  = Mtl by night ;
$VAR_categories[0][file]  = montreal_by_night ;
...
And many others variables. And magic_quotes seems to work for global 
vars too. Is there a way to modify no_magicquotes() to make this 
function works with all global vars ? Another for...each...but how ?

Thanks,
Vincent.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] define variables.

2003-03-05 Thread Vincent M.
Hello,

I do a lot of define like that:
define (_LANG1, Server options);
define (_LANG1, Manage your system);
etc...
And stuff like that:
  if($num == 1) {
$mgs = _LANG1 ;
  }else if($num == 2) {
$mgs = _LANG2 ;
  }
etc...
But I do want to avoid all these if and else, is there a way to do 
something like that:
$mgs = _LANG.$num ;
?

Thanks.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] define variables.

2003-03-05 Thread Vincent M.
Jason K Larson wrote:
http://www.php.net/manual/en/function.constant.php

$msg = constant('_LANG'.$num);

HTH,
--
Jason k Larson
Strange it does not work if I do:
  $num = _LANG.$num ;
  $msg = constant($num) ;
  echo $mgs ; //It does not display anything!
But If I do it directly, it works:
  $num = _LANG.$num ;
  echo constant($num) ; //It display the constant variable.
Anyway it works  :-)

Thanks,
Vincent.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Php and JavaScript

2003-03-02 Thread Vincent M.
Valentin wrote:
Hi,
Is any way to write JavaScript code into PHP function or to send PHP's
variables values to the JScript variables?
Thanks,


Of course, you can create dynamicaly javascript via php, ie:
  echo 
script language=\JavaScript\
  var yourvar = $onephpvar ;
/script ;
Is that what you were asking for ?

Vincent.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Php and JScript

2003-03-02 Thread Vincent M.
Valentin wrote:
Hi,
Is any way to write JavaScript code into PHP function or to send PHP's
variables values to the JScript variables?
Thanks,



Yes, I think there is a way to do so!
;-)
Vincent.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] 2 questions !

2003-03-01 Thread Vincent M.
Hello,

I didn't find in the doc how to:
 - Know the full path of the current directory. Like /var/www/to/the/path
- Know under which user work apache, to know when I create a file whose 
file it is...

Thanks.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: 2 questions !

2003-03-01 Thread Vincent M.
Greg Beaver wrote:
Vincent M. [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hello,

I didn't find in the doc how to:
 - Know the full path of the current directory. Like /var/www/to/the/path


try using dirname(__FILE__) or dirname($_SERVER['PATH_TRANSLATED'])

dirname($_SERVER['PATH_TRANSLATED'])is good for me.

How can I know all these variables, for example, now I need to know the 
upload_max_filesize ! And later, for sure, I will have to know another 
config option of the server...wich can be access by such variable.
How to know all these variable ?

Thanks.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] What ?

2003-03-01 Thread Vincent M.
Hello,

I am the bus stop boy. The business I was talking about is an php 
gallery editor. You can see mine in action here:
  My photos of Montreal:
http://www.siova.net/photos/index.php?type=mtlimg=mtl_diapo=0pref_size=512version=2
  My photos of Toulouse, the city I was born in:
http://www.siova.net/photos/index.php?type=tseimg=tse_diapo=0pref_size=512version=2

Translation for better browsing:
Voir l'image suivante - See the next image
Voir l'image précédante - See the forward image
Chargement de l'image en cours...Veuillez patienter - Loading image 
in progress...Please wait

Have you ever seen such a good gallere browser ?
And look at my future concurent:
http://www.photopost.com/
See photopost in action:
http://www.fordf150.net/photopost
Another future concurent:
http://www.imagefolio.com
That's it at this time.

SeeYa,
Vincent.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Sessions and phplib.

2003-02-17 Thread Vincent M.
Hello,

I am using the phplib just for the sessions management and unfortunately 
this projects seems dead (no?), no official realise using the php4 
session support.
What's more, i am looking for a sessions library which could check the 
IP adress of users not only the cookie. In case of bad hats steal cookies...
What I use in my current code is:
page_open(array(sess = SIOVA_Session, auth = 
SIOVA_Challenge_Auth, perm = SIOVA_Perm));
$perm-check(user);
page_close() ;
$auth-auth[perm] == admin ;// and others privilege checks...
$sess-delete() ;
$auth-unauth();
$auth-logout();
etc...

What do you think I should use instead of the phplib, do you think I 
should change what I use at this time which works full well :-/
I do want to use a library checking the cookies AND the IP adresses...to 
do something more secure.


Thanks for you advises,
Vincent.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Resizing a png tranparent image.

2002-12-28 Thread Vincent M.
Hello,

I am trying to resize a png file, my autograph ;-)


Good result thanks to gimp:
http://boxfly.free.fr/test/test1.jpg
Bad result with php:
http://boxfly.free.fr/test/test2.jpg

This is my PHP code to resize the autograph:

$newAuto = imagecreatetruecolor( $widthImgAu, $heightImgAu) ;
imagecolortransparent($newAuto,imagecolorat($newAuto,0,0)) ;
$imgAuto = ImageCreateFromPNG($img_auto);
imagecopyresized($newAuto, $imgAuto, 0, 0, 0, 0, $widthImgAu, 
$heightImgAu, $imageInfoAu[0], $imageInfoAu[1]) ;
ImagePNG($newAuto,new_auto.png);

So I tried:
imagecopyresampled($newAuto, $imgAuto, 0, 0, 0, 0, $widthImgAu, 
$heightImgAu, $imageInfoAu[0], $imageInfoAu[1]) ;
Instead of imagecopyresized...

To copy the autograph inside the photo I do:
$newImg = ImageCreateFromJPEG($img_des);
ImageAlphaBlending($newImg, true);
ImageCopy($newImg, $newAuto, $posX, $posY, 0, 0, $widthImgAu, $heightImgAu);

But with no sucess

If I do not resize the png autograph and copy it directly inside the 
photo, that's perfect, as a result the problem is the resizing...

What do I have to do to resize a png image without loosing transparency ?

Thanks.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php