Re: [PHP] Need help with regular expression

2008-07-10 Thread Maxim Antonov
inside {%%% %%%} points to empty array item - all section between {%%% %%%} must be deleted. Daniel Brown : On Wed, Jul 9, 2008 at 5:21 AM, Maxim Antonov <[EMAIL PROTECTED]> wrote: Hi, all! I try to use folowing regular expression: $out = preg_replace('#\{%%%.*?\{%bigfoto%\}.

Re: [PHP] Running mount from PHP

2008-07-09 Thread Maxim Antonov
Try to do folowing write shell script #!/bin/sh mount /dev/hdb /home/mountpoint then write C code int main(){ system ("mount.sh"); return 0; } then compile C code gcc main.c -o wrapper then chmod : # chmod a+s wrapper and do from php: system ('wrapper'); Per Jessen пишет: Mário Ga

Re: [PHP] checking if URL's exist

2008-07-09 Thread Maxim Antonov
You need $s= fsockopen('host.com',80); fwrite($s,"GET ".$URL." HTTP/1.1 \r\n"); fwrite($s,"Host: host.com \r\n\r\n"); and you must read first string - if url exists string begining with 200 or 304 if url not exists string begin - is 404 Børge Holen пишет: On Wednesday 09 July 2008 12:18:

[PHP] Re: mount

2008-07-09 Thread Maxim Antonov
Hello, Mário You may use function system! system('mount -t vfat -o rw /dev/hdb1 /home/www/upload',$err); if($err){ echo "We have error with number {$err}"; } Mário Gamito : Hi, I need to perform a mount and a umount from PHP. I've searched the manual, but didn't find anything useful. A

[PHP] strange behavior, when converting float to int

2008-05-05 Thread Maxim Antonov
Hi, all! Is this a bug? [EMAIL PROTECTED]:~$ /usr/bin/php 1.php 45 45 float(46) [EMAIL PROTECTED]:~$ /usr/bin/php -v PHP 5.3.0-dev (cli) (built: Apr 4 2008 11:37:33) Copyright (c) 1997-2008 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2008 Zend Technologies [EMAIL PROTECTED]:~$ cat