This one is perfect:
$text = preg_replace( "/(?\s]+)/i", "URL", $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
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
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 r
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
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
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 I
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=zip&go_search=1&restrict=&method=and&sort=score
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/
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
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/
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 unsubscr
Hello,
To download a file after a form like that:
Do you want to download?
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
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
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"]
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 tha
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 eas
Sebastian wrote:
put this in a .php file:
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 availa
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(
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/)
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
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 unsubscr
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:
$re
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 = di
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);
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);
}
bre
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, $v
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 w
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( ($i>0)&&($i<10)) {
$i = "".$i ;
} else if( ($i>9)&
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 = stripsl
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:
$nu
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
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
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 "
var yourvar = $onephpvar ;
" ;
Is that what you were asking for ?
Vincent.
--
PH
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=mtl&img=mtl_&diapo=0&pref_size=512&version=2
My photos of Toulouse, the city I was born in:
http://ww
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_TRANS
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
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
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) ;
imagec
38 matches
Mail list logo