Re: [PHP] How to implement mass emailing?

2004-10-07 Thread Tumurbaatar S.
Thank you, all! 

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



[PHP] How to implement mass emailing?

2004-10-06 Thread Tumurbaatar S.
The scenario is:

1. Site administrator logs into his admin page and writes
some message on a form.
2. After clicking submit the web script should broadcast
this message to several hundred subscribers.

And I'm wonder how to implement this on PHP.
Sending an email to each subscribers can take
a much time and PHP will stop after max_execution_time.
Any ideas? 

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



[PHP] include but not browse

2004-07-05 Thread Tumurbaatar S.
Generally, it isn't a PHP related but...
I'm not a Linux/Apache user and know nothing
about how to manage permissions there.
I need to disable browsing for some of subfolders
on my site but php scripts located in these subfolders
should be accessible by php's include/require.
It's easy to do on Windows/IIS but how to do it on Linux/Apache?

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



[PHP] Remote include

2004-06-09 Thread Tumurbaatar S.
I need to include in my PHP code a script located at a remote
web server. The script is also PHP and contains some functions and
class definitions. Because the remote server also use PHP, I've
changed my include file extension (php) to something other (e.g. inc).
Because I'm afraid that the server will execute the script (which
produces nothing) instead of sending its content. Am I doing right?
Also, when the remote server sends this file back to my local server,
what MIME type is returned in the response header? Anybody know it?
Do I need to specify some type?

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



[PHP] Re: Regular Expression

2004-05-05 Thread Tumurbaatar S.
Because the substrings can contain any char-s including
commas. Also I use reg exp not for splitting only but
for validating whether whole string and the substrings
are correctly formatted. Using reg exp requires much less
coding than traditional programming.


 Why not just strip out the braces and explode on commas?  That'll be
 lighter than regexps any day.  If the input is guaranteed to be
 formatted the way you describe, you could do something like:

   $out = explode(,, substr($in, 1, strlen($in)-2));

 -- 
   Paul Chvostek [EMAIL PROTECTED]
   it.canadahttp://www.it.ca/
   Free PHP web hosting!http://www.it.ca/web/

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



[PHP] Regular Expression

2004-05-04 Thread Tumurbaatar S.
There's an input string like {str1,str2,...,strN}. I want to capture
all these strings and due to complexity of them I use a preg_match_all()
instead of simple split. A pattern for the matching strings is ready but
I cannot imagine how to specify that strings are separated by commas
and the last one is not followed by comma. For example, I'm afraid that
this pattern /^{(?:(pattern),)*|(pattern)?}$/ can match and capture
properly constructed input string, but, in addition, this matches if
the string end is ,}. Any ideas?

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



[PHP] Re: Regular Expression

2004-05-04 Thread Tumurbaatar S.
Forgot about curly brackets. The above example is:
/^\{(?:(pattern),)*|(pattern)?\}$/

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



Re: [PHP] Exceptions and builtin functions in PHP5

2004-04-08 Thread Tumurbaatar S.

[EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
  If I understand right, PHP5 has an exception
  handling mechanism but it is only for manual using, i.e.
  a programmer can use try/catch but only for own code.
  PHP's built-in functions and functions from extensions still
  use old return value method. Yes?
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php

 I bloody hope not or what is the point ?

In the current version of PHP, many built-in functions (if not all?)
return FALSE on an error and some resource/handle on a success.
So, instead of coding like this:
...
$res = some_builtin_func(); // func does not raise exception on error
if (!$res)
throw new Exception();// so I throw it manually
...
I want to write:
...
$res = some_builtin_func(); // func raises exception on error
// so I don't need to write additional lines
...

So will PHP5 (or future versions) work as in my 2nd example?

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



[PHP] Exceptions and builtin functions in PHP5

2004-04-07 Thread Tumurbaatar S.
If I understand right, PHP5 has an exception
handling mechanism but it is only for manual using, i.e.
a programmer can use try/catch but only for own code.
PHP's built-in functions and functions from extensions still
use old return value method. Yes?

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