[PHP] Help me to win the battle with browser's cache

2001-11-12 Thread Olexandr Vynnychenko

Hello php-general,

  I have index.php, which has Log out.
  When I click it, I am logged out the site. But I type "index.php" in
  browser's address bar, press Enter and ... it shows "non-logouted"
  page. What should I write in php code to tell browser something like
  "forget about old page, don't display it, get the newest version"?
  Some time ago I tried to do that in several ways and nothing gived
  100% result. And other thing I saw was that Netscape and Explorer
  behave in different ways in such cases. Could someone help me? Maybe
  this topic was discussed before, but still... I appreciate greatly
  any suggestion.

-- 
 Olexandr Vynnychenko  mailto:[EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Using PHP for directory indexing

2001-11-12 Thread Rudolf Visagie

function GetFiles ($DataPath, &$files, &$nfiles) {

// Reads a directory and puts filenames into a sorted array

$handle=opendir($DataPath);
if ($handle) {
$nfiles = -1;
while (false!==($file = readdir($handle))) {
if ($file != "." && $file != "..") {
$nfiles++;
$files[$nfiles] = $file;
}
}
sort($files);
closedir($handle);
}
return 0;
}

Rudolf Visagie
Principal Software Developer
Digital Healthcare Solutions
Tel. +27(0)11 266 6946
Fax. +27(0)11 266 5080
Cell: +27(0)82 895 1598
E-mail: [EMAIL PROTECTED]


-Original Message-
From: Kevin Garrett [mailto:[EMAIL PROTECTED]]
Sent: 12 November 2001 03:08
To: [EMAIL PROTECTED]
Subject: [PHP] Using PHP for directory indexing


Hi All,

I am wondering if anyone can help me with this.  I want people
accessing my 
site to see a list of HTML reports but I don't want to turn on Directory 
indexing on my Apache webserver, seeing as the directory path is present.  
What I'm looking to do, is to write a basic php script which will read the 
files in a certain directory & create links to be presented to the user.  
Has anyone ever done this before?  Can someone give me an example or a 
headstart on this.

Thanks in advance
Kev

_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Using PHP for directory indexing

2001-11-12 Thread Oosten, Sjoerd van

\n");

// open directory
$myDirectory = dir(".");

// get each entry
while($entryName = $myDirectory->read())
{
print("$entryName \n");
}

// close directory
$myDirectory->close();

print("\n");
?>


Sjoerd van Oosten 
Digitaal vormgever [EMAIL PROTECTED]
Datamex E-sites B.V. 
http://www.esites.nl
Minervum 7368 Telefoon: (076) 5 730 730 
4817 ZH BREDA Telefax: (076) 5 877 757 
___


-Oorspronkelijk bericht-
Van: Kevin Garrett [mailto:[EMAIL PROTECTED]]
Verzonden: maandag 12 november 2001 14:08
Aan: [EMAIL PROTECTED]
Onderwerp: [PHP] Using PHP for directory indexing


Hi All,

I am wondering if anyone can help me with this.  I want people
accessing my 
site to see a list of HTML reports but I don't want to turn on Directory 
indexing on my Apache webserver, seeing as the directory path is present.  
What I'm looking to do, is to write a basic php script which will read the 
files in a certain directory & create links to be presented to the user.  
Has anyone ever done this before?  Can someone give me an example or a 
headstart on this.

Thanks in advance
Kev

_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Using PHP for directory indexing

2001-11-12 Thread Kevin Garrett

Hi All,

I am wondering if anyone can help me with this.  I want people accessing my 
site to see a list of HTML reports but I don't want to turn on Directory 
indexing on my Apache webserver, seeing as the directory path is present.  
What I'm looking to do, is to write a basic php script which will read the 
files in a certain directory & create links to be presented to the user.  
Has anyone ever done this before?  Can someone give me an example or a 
headstart on this.

Thanks in advance
Kev

_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] mail() with mailing lists problem

2001-11-12 Thread Rudolf Visagie

Hi All,

While everybody is on this topic, here's a problem I have been having. I use
mail() in a function in a loop to send e-mail with an attachment. The
e-mails get sent out to the different recipients but only the last one gets
sent correctly. The rest loses the 'From:' somewhere so that the message
ends up with the server name as from who and with the encoded attachment
inside of the message body. Here's the function:

function mail_attachment ($to, $subject, $message, $addr_from, $attachment,
$filename) {

/*
This function sends an e-mail with a file attachment using the
standard
PHP mail function with parameters $to, $subject and $message.
The $attachment parameter is a string with the attachment file
content with
filename $filename.
*/

$boundary = "b".md5(uniqid(time()));
$mime = "From: $addr_from\n";
$mime .= "Reply-To: $addr_from\n";
$mime .= "X-Mailer: Digital Healthcare Solutions\n";
$mime .= "X-Sender: $addr_from\n";
$mime .= "Content-type: multipart/mixed; ";
$mime .= "boundary = $boundary\n\n";
$mime .= "This is a MIME encoded message.\n\n";
// First the regular message
$mime .= "--$boundary\n";
$mime .= "Content-type: text/plain\n";
$mime .= "Content-Transfer-Encoding: base64";
$mime .= "\n\n".chunk_split(base64_encode($message))."\n";
// Now the attachment
$mime .= "--$boundary\n";
$mime .= "Content-type: text/plain\n";
$mime .= "Content-Transfer-Encoding: base64\n";
$mime .= "Content-Disposition: attachment; ";
$mime .= "filename = ".chr(34).$filename.chr(34);
$mime .= "\n\n".chunk_split(base64_encode($attachment))."\n";
$mime .= "--$boundary--";

mail ($to, $subject, "", $mime);
}

and here's the loop in which it gets called:

$i = 0;
while (isset($EmailAddress[$i])) {
mail_attachment ($EmailAddress[$i], "URGENT Communication",
$message, $addr_from, $attachment, $filename);
$i++;
}

Does anybody have any ideas?

Rudolf Visagie
Principal Software Developer
Digital Healthcare Solutions
Tel. +27(0)11 266 6946
Fax. +27(0)11 266 5080
Cell: +27(0)82 895 1598
E-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re2: [PHP] Url Length Limitations?

2001-11-12 Thread Valentin V. Petruchek

You see, I call for php script from Delphi program...
I can do it with InternetOpen() so the only method available for me is GET -
i can use page url only

Or I'm mistaken and it's possible to use POST here? who knows?
- Original Message -
From: "Christoph Starkmann" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, November 12, 2001 2:19 PM
Subject: RE: [PHP] Url Length Limitations?


> Hi!
>
> > Is there any limitation for length of url like this
> > accept.php?set=qwerty...
>
> Depends on the OS/Server, but you'll have to consider one to exist...
>
> > What is the maximum $set length i can pass to script as a parameter?
>
> Why don't you use POST? With POST, there is not limitation...
>
> Cheers,
>
> Kiko
>
> -
> It's not a bug, it's a feature.
> christoph starkmann
> mailto:[EMAIL PROTECTED]
> http://www.fh-augsburg.de/~kiko
> ICQ: 100601600
> -
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: mail() w/ mailing lists

2001-11-12 Thread _lallous

sending one by one will take ages no?

"Phpgalaxy.Com" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I just finished making a bulk emailer script with the mail() function. I
would probably recommend doing a loop,
> sending one email at a time. Seems that way you're not putting too much
pressure on it at one time (if that makes
> any sense). If you can find a decently-written smtp-class that uses the
socket directly, that would be much better.
> Then, you're not limit to sending to one mail server, and there's greater
flexibility in the code; room to edit/add
> code when needed, and you have the opportunity to log specific error
messages if ya need to. The only problem is
> finding an SMTP class that'll work without too much editing, unless you
have the socket knowledge to write your own.
> Whether or not the socket commands in PHP work well in Windows or not,
I've not a clue. I know there are some
> Windows issues with the mail() command as well, and a few other PHP
functions that just don't work under Windows. =)
>
> --
> From PHPGalaxy.com, earn up to $10 per order selling our PHP Scripts
> and Software on your Site. http://www.phpgalaxy.com/aff/
>
> Also, get a fast free POP3 email account, you @php.la at
> http://www.phpgalaxy.com/search/
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] session

2001-11-12 Thread Brendon

I am using PHP 4.06, IE 6 and Win 2000.

When i register a session like so:

session_start();
session_register("SESSION_UserID");


and on the next page refer to the session:

session_start();
if(!session_is_registered("SESSION_UserID"))
{

header("Location: error.php?ec=1");
exit;
}

?>

It registers a new session:
I then have a session as so in the sessons directory:
SESSION_UserID|s:1:"1";SESSION_UPERMS|s:1:"1";
and a blank new one.

any ideas?




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Attachments again

2001-11-12 Thread DL Neil

Hi Sjoerd,
 
> When i send a dynamic HTML newletter, which contains newsitems in the
> database I now send the e-mail with a link to the image on the webserver.
> What i would like to do is instead of linking the image, send the image as a
> sort of attachment. So an internetconnection is not required when viewing
> the e-mail.


I use www.phpguru.org's, HTML MIME class.

Regards,
=dn



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: executing another php.script

2001-11-12 Thread Steve Brett

you don't need a sepaerate script.
define two functions and then loop through calling the second function.

much neater (and easier)

Steve

"David Tod Sigafoos" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I am sure that I am just .. missing this ..
>
> From one script I wish to 'execute' another script.  How is this done?
>
> Setting a link and clicking is not the answer .. one script loops
> through all the 'selected' rows and I want to 'execute' another script
> for each row .. can this be done?
>
> thanks
>
> DSig
> David



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: emailing attachments

2001-11-12 Thread Steve Brett

you need:



{can't remember the exact syntax but it's the file type you're looking for,
opens the file open dialogue so they can choose local file}

Steve

"Don" <[EMAIL PROTECTED]> wrote in message
004a01c16b33$b43a2c60$4fad2b18@cr993021a">news:004a01c16b33$b43a2c60$4fad2b18@cr993021a...
Hi,

I have a class that allows me to send e-mail with an attachment.  I have a
form that gathers information and I would like to allow the user to attach a
file from his local drive.  Is there a PHP routine that allows the user to
browse his drive and choose a file?

Thanks,
Don




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Url Length Limitations?

2001-11-12 Thread Christoph Starkmann

Hi!

> Is there any limitation for length of url like this
> accept.php?set=qwerty...

Depends on the OS/Server, but you'll have to consider one to exist...

> What is the maximum $set length i can pass to script as a parameter?

Why don't you use POST? With POST, there is not limitation...

Cheers,

Kiko

-
It's not a bug, it's a feature.
christoph starkmann
mailto:[EMAIL PROTECTED]
http://www.fh-augsburg.de/~kiko
ICQ: 100601600
-

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Url Length Limitations?

2001-11-12 Thread Valentin V. Petruchek

Hi everyone!

Is there any limitation for length of url like this
accept.php?set=qwerty...

What is the maximum $set length i can pass to script as a parameter?

Zliy Pes: http://zliypes.com.ua
[EMAIL PROTECTED]





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: #!/usr/local ignore option?

2001-11-12 Thread Steve Brett

why not just keep the module and drop the #!/usr/local/bin/php at the
beginning of each script .. ?

I've not heard of an ISP that asked for this b4 ...

Steve

"Michael Rice" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi All,
> I have a kind of unique problem that I've had trouble finding information
> on around the net. I have a site that I pay a hosting company for that
> expects my php scripts to have #!/usr/local/bin/php at the beginning of
> each script which works fine. Now, I'd like to keep a development server
> at home that uses Apache 22 and the latest php.
>
> I followed the installation instructions carefully can got php running
> great at home. The only problem is that it serves up the #!/usr... at the
> beginning of file, which wouldn't bother me except that it causes major
> problems with redirects.
>
> Any ideas on how to tell my development server to ignore that line or to
> reconfigure my apache/php in some such that it won't serve up that line??
>
> I promise that I did due diligence in looking around but came up empty
> handed... keyword searching has its limitations...
>
> Thanks very much in advance.
>
> --
> Sent through GMX FreeMail - http://www.gmx.net
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Attachments again

2001-11-12 Thread Caspar Kennerdale

On the attachment subject,

does anyone know how to specify multiple mime types?

I have my attachment script, however people may be using it to send gifs,
swfs, or text files

I am specifyinmg the mime types like this


$type =  "image/gif";

 $header .= "Content-Type: $type;

wuld I do something like turn $type into an array or do something like

$type =  "image/gif | mimetype/2 | mimetype/3 | mimetype/4";

THis doesnt seem to work  (obviously mimetype/ * = a specified mime type)

Thanks in advance for any suggestions

Caspar


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Help with DBM (dbmfetch)

2001-11-12 Thread PHP Rules

Hi!!

I'm trying to visualize a .dbm file. It's hosted
in the same directory as my .php file.

With this test example:

-//---
PHP Test



-//--

I do not get anything.

Could anybody provide me an example of using DBM?

Thank you very much.
___
Recibe el boletín semanal con lo mejor del mundo del motor de Movendus.com
http://www.movendus.com/pr.jsp?ID1=2403&ID2=2605

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: apache + ftp!

2001-11-12 Thread Benjamin

do you know about cerberus-ftp? how is it?



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Attachments again

2001-11-12 Thread PHPGalaxy.com

I've found a great SMTP class file that supports file attachments. Its just a
few lines of code that base64_encode's the attachment, and sticks it at the end
of the email. I guess just rip whatever code ya need out of this, for doing
attachments, and insert it into your own. Maybe do a little RFC reading to
figure out multiple atachments. =)

(sendmsg() Copyright © 2001 Wanja Hemmerich)


--
>From PHPGalaxy.com, earn up to $10 per order selling our PHP Scripts
and Software on your Site. http://www.phpgalaxy.com/aff/

Also, get a fast free POP3 email account, you @php.la at
http://www.phpgalaxy.com/search/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Attachments again

2001-11-12 Thread Oosten, Sjoerd van

Hi,

When i send a dynamic HTML newletter, which contains newsitems in the
database I now send the e-mail with a link to the image on the webserver.
What i would like to do is instead of linking the image, send the image as a
sort of attachment. So an internetconnection is not required when viewing
the e-mail.

Is this possible and how should I do this?

Thanks in advance,

Sjoerd


Sjoerd van Oosten 
Digitaal vormgever [EMAIL PROTECTED]
Datamex E-sites B.V. 
http://www.esites.nl
Minervum 7368 Telefoon: (076) 5 730 730 
4817 ZH BREDA Telefax: (076) 5 877 757 
___


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: mail() w/ mailing lists

2001-11-12 Thread Henrik Hansen

[EMAIL PROTECTED] (Dl Neil) wrote:

 > It is my opinion (too?) that mail() is difficult to use in a
 > non-trivial application. I have not used/investigated sockets. I have
 > had good success with a 'wrapper class/function set' for mail(). I'm
 > wondering if I should also look at what you have proposed.
>
 > What does the extra effort of using sockets give you that using a
 > decent wrapper for mail() wouldn't? For example do you get a 'msg
 > sent' confirmation advice?

speed, sockect are AFAIK faster than normal mail().

 > Does the socket-based connection require more than standard access
 > (Id/pswd) to the SMTP server? -is it both Linux and Windows
 > compatible? -is it both in-house server and ISP compatible?

nope does not require extra things and it should work on both
platforms. I do not know if all isp's carry it or if it's normal to
include it.

 > Please advise, =dn (will appreciate good web references if it would
 > save you time)

you can test your self:

http://www.greatbridge.org/project/phpsmtp/ - a mailer that uses
sockets.
http://phpmailer.sourceforge.net - a wrapper with more features also,
with this one you can use both mail() or SMTP so you can do a little
speed testing.

-- 
Henrik Hansen

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Re: apache + ftp!

2001-11-12 Thread Matt Williams


> on win32 i like g6ftp server

I go along with this recommendation.

Had some problems on 2k with serv-u

M:

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




php-general Digest 12 Nov 2001 11:19:44 -0000 Issue 990

2001-11-12 Thread php-general-digest-help


php-general Digest 12 Nov 2001 11:19:44 - Issue 990

Topics (messages 74193 through 74256):

Re: Help with array in class needed
74193 by: ArsenKirillov
74194 by: ArsenKirillov

Re: putting the result of PHP code into a string
74195 by: Rasmus Lerdorf

Stripping IMG tags
74196 by: Richard S. Crawford
74197 by: Martin Towell
74198 by: Richard S. Crawford
74233 by: _lallous

Re: How to use class methods in callback ?
74199 by: Papp Gyozo

pass javascript variable to php without submit or reload
74200 by: Phieu Huynh
74201 by: Richard S. Crawford
74202 by: Phieu Huynh

please tell me
74203 by: boonlert phokaow
74204 by: Rasmus Lerdorf
74205 by: Richard S. Crawford
74207 by: Jeff Gannaway

Get Unbelieveable Artwork At No Cost To You + A Free Shopping Spree
[ydgpv]
74206 by: unique_art_offer.publicist.com

emailing attachments
74208 by: Don
74212 by: Don
74215 by: Martin Towell
74216 by: Don

executing another php.script
74209 by: David Tod Sigafoos
74211 by: Richard S. Crawford
74217 by: Martin Towell

User authentication problem.
74210 by: CaMeL

php newbie - need advice
74213 by: Scott Dudley
74222 by: David Robley

possible safe mode bug with opendir() ?
74214 by: operator.superprivate.com
74219 by: Yasuo Ohgaki
74221 by: operator.superprivate.com
74226 by: Yasuo Ohgaki

how do the thing?
74218 by: Galkov Vladimir
74224 by: Martin Towell

PHP/MySQL Question
74220 by: Peter Brown

Save to Desktop
74223 by: Sharat Hegde
74240 by: Matt McClanahan
74247 by: Sharat Hegde

Question about using system call/gzip
74225 by: Joelmon2001.aol.com
74227 by: David Robley
74228 by: Joelmon2001.aol.com
74230 by: David Robley

Resetting ID in mySQL DB
74229 by: Thomas Edison Jr.
74231 by: Jack Dempsey

Login verification
74232 by: Ashley M. Kirchner
74235 by: Jack Dempsey

mail() w/ mailing lists
74234 by: _lallous
74236 by: Henrik Hansen
74253 by: DL Neil
74255 by: PHPGalaxy.com

Re: Everything between something becomes an array element
74237 by: ArsenKirillov

imap_mail_compose correct?
74238 by: Martin Gutbrod

Unix timestamp ?
74239 by: De Necker Henri
74241 by: _lallous

Login Verification - snag!
74242 by: Ashley M. Kirchner
74243 by: Morten Winkler Jørgensen

PHP/MySQL
74244 by: phantom
74245 by: Morten Winkler Jørgensen
74246 by: Richard Black

apache + ftp!
74248 by: Benjamin
74254 by: Daniel Masur
74256 by: PHPGalaxy.com

Re: Classes Question
74249 by: Paul - Zenith Tech Inc
74250 by: Paul - Zenith Tech Inc
74251 by: Paul - Zenith Tech Inc

Lotus Domino & PHP
74252 by: Richard Black

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
[EMAIL PROTECTED]


--

--- Begin Message ---

AK>but when I try to copy the array outside the class using a function that
AK>only does a return $this->$data, I only get one sub-array of the
AK>whole one.
AK>
AK>Any ideas?
AK>
AK>Thanks
AK>
AK>Alexander
AK>
AK>Code:
AK>
AK>class Adressen {
AK> var $connect; // database-handle
AK> var $daten = array(); // array for data
AK>
AK> // Constructor
AK> function Adressen($datenbank) {
AK>  $this->$connect = $datenbank->getConnect();


Be carefull  :-)
$this->connect = $datenbank->getConnect();



AK> }
AK>
AK> // read data from database
AK> function readData() {
AK>  $this->$daten = array();
AK>  $result = mysql_query("select * from adressen");
AK>  while($data = mysql_fetch_array($result)) {
AK>   extract($data);
AK>   $this->$daten[$AdressenID] = array("strasse" => $Strasse,
AK>"plz" => $PLZ,
AK>"ort" => $Ort, "land" => $Land, "telefon" => $Telefon, "telefax" =>
AK>$Telefax, "email" => $Email);
AK>  }
AK> }
AK>
AK> function getData() {
AK>  return $this->$daten;


Be carefull  :-))
AK>  return $this->daten;


AK> }
AK>}
AK>
AK>
AK>



 Here is working sanple is u are
losen again
$data, I only get one sub-array of the whole one.

Any ideas?

Thanks

Alexander

Code:
*/
class Adressen {
 var $conn_ect; // database-handle
 var $daten; // array for data

 // Constructor
 function Adressen($datenbank)
 {
$it=$datenbank->getConnect();
echo $this->connect = $it;
//$result = mysql_query("select * from mysql.db");
//if (!$result){echo "false result !";exit();}
//print_r( $result );

 }

 // read data from database
 function readData()
 {

echo 

Re: [PHP] Re: apache + ftp!

2001-11-12 Thread PHPGalaxy.com

I personally would recommend Serv-U. Latest version seems greatly stable,
beautiful GUI, multiple domain support, I've been using Serv-U for quite a few
years now, and it's just *never* let me down! It could seriously benefit from
comand-line account creation, which I may invent on my own. =)


--
>From PHPGalaxy.com, earn up to $10 per order selling our PHP Scripts
and Software on your Site. http://www.phpgalaxy.com/aff/

Also, get a fast free POP3 email account, you @php.la at
http://www.phpgalaxy.com/search/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: mail() w/ mailing lists

2001-11-12 Thread PHPGalaxy.com

I just finished making a bulk emailer script with the mail() function. I would 
probably recommend doing a loop,
sending one email at a time. Seems that way you're not putting too much pressure on it 
at one time (if that makes
any sense). If you can find a decently-written smtp-class that uses the socket 
directly, that would be much better.
Then, you're not limit to sending to one mail server, and there's greater flexibility 
in the code; room to edit/add
code when needed, and you have the opportunity to log specific error messages if ya 
need to. The only problem is
finding an SMTP class that'll work without too much editing, unless you have the 
socket knowledge to write your own.
Whether or not the socket commands in PHP work well in Windows or not, I've not a 
clue. I know there are some
Windows issues with the mail() command as well, and a few other PHP functions that 
just don't work under Windows. =)

--
>From PHPGalaxy.com, earn up to $10 per order selling our PHP Scripts
and Software on your Site. http://www.phpgalaxy.com/aff/

Also, get a fast free POP3 email account, you @php.la at
http://www.phpgalaxy.com/search/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: apache + ftp!

2001-11-12 Thread Daniel Masur

on win32 i like g6ftp server

"Benjamin" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> hey group!
>
> i have apache installed on an win2000 machine and now i need an good and
> stable ftp server! which one does i take!
>
> thank you, ben
>
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: mail() w/ mailing lists

2001-11-12 Thread DL Neil

>  > Is is advisable that I mail lots of users from a database via one call to
>  > mail() ?
>
> why not make a loop and send to one email at a time. if you have over
> 1000 I would use something else than mail(), ex direct to smtp with sockets.


Henrik,

It is my opinion (too?) that mail() is difficult to use in a non-trivial application. 
I have not
used/investigated sockets. I have had good success with a 'wrapper class/function set' 
for mail(). I'm wondering
if I should also look at what you have proposed.

What does the extra effort of using sockets give you that using a decent wrapper for 
mail() wouldn't? For
example do you get a 'msg sent' confirmation advice?

Does the socket-based connection require more than standard access (Id/pswd) to the 
SMTP server? -is it both
Linux and Windows compatible? -is it both in-house server and ISP compatible?

Please advise,
=dn
(will appreciate good web references if it would save you time)


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Lotus Domino & PHP

2001-11-12 Thread Richard Black

Hi,

Can anyone tell me the latest on whether or not PHP can talk tirectly to 
Lotus Domino/Notes???

I've had a look through the archive, and as far as I can see there was a 
project to do this which was going to be made available at the start of the 
year, but I've not seen any mention of this more recently, other than 
questions.

Any info greatly appreciated, as we have a number of companies we are 
talking to who are standardised on Lotus across their organisation...

Thanks,

Richy

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Classes Question

2001-11-12 Thread Paul - Zenith Tech Inc

Thanks Andrew... I basically tried that, but without the ampersand symbols.
I'll give that a try

Many thanks,
Paul

"Andrew Kirilenko" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Hello!
>
> Try to declare CheckBannedUser as "function CheckBannedUser ($foo, &$db)"
> and call it "$users->CheckBannedUsers("foo", &$db)"
>
> Note ampersand symbols!
>
> Best regards,
> Andrew Kirilenko.
>
> > -Original Message-
> > From: PaulC [mailto:[EMAIL PROTECTED]]
> > Sent: Sunday, November 11, 2001 8:10 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] Classes Question
> >
> >
> > I'm hoping somebody has the answer to this!
> >
> > I have 3 pages, one a normal PHP page, and 2 which are classes.
> >
> > One class, is a MySQL class I have written to connect/update users, etc
> > And the other is the manage users on the system.
> >
> > Is there a way I can get the "users" class to talk to the "mysql" class?
> >
> > I have this code to make a new instance of the MySQL class (the True
means
> > use persistent connections) and a new instance of the users class
> >
> > $db = new MySQL(True);
> > $users = new Users();
> >
> > I am then using this code to check the list of banned users
> >
> > $users->CheckBannedUser("spacetowns",$db);
> >
> >  In the CheckBannedUser function, I have this
> >
> > $db->sql_query("SELECT user FROM banned_users");
> >
> > But that does not work, (it works fine when used from the
> > standard PHP page)
> >
> > Is it not possible to do what I am trying to do?
> > Or am I doing it all wrong?
> >
> > Many thanks,
> > Paul
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Classes Question

2001-11-12 Thread Paul - Zenith Tech Inc

I did have a look in the manual, but I got lost half way through!

I always think it's a good idea to describe the problem well :)

Thanks,
Paul

"Andreas Landmark" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> On Sun, Nov 11, 2001 at 06:09:40PM -, PaulC wrote:
> > I'm hoping somebody has the answer to this!
> >
> > I have 3 pages, one a normal PHP page, and 2 which are classes.
> >
> > One class, is a MySQL class I have written to connect/update users, etc
> > And the other is the manage users on the system.
> >
> > Is there a way I can get the "users" class to talk to the "mysql" class?
> >
>
> Inheritance, let the users class inherit the functions of the mysql
> class, that's the nicest and probably the best way to do it.
>
> Read up on OO in the manual to find out how to do inheritance in PHP.
>
> 
>
> --
> Andreas D Landmark / noXtension
> Every solution breeds new problems.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Classes Question

2001-11-12 Thread Paul - Zenith Tech Inc

Thanks for the help Pierre

Paul

"Pierre-Yves" <[EMAIL PROTECTED]> wrote in message
00c001c16940$47db1c90$0100a8c0@py">news:00c001c16940$47db1c90$0100a8c0@py...
> Hello,
>
> what I would do is build the instance of your mysql class in the
constructor
> of the user class
>
> class User{
>   var $db;
>
>   // constructor
>   function User(){
> $this->db = new Mysql(True);
>   }
>
>   // function that show how to use the Mysql class in the User class
>   function foo(){
> $this->db->sql_query("SELECT user FROM banned_users");
>   }
> } // end class
>
> hope it help,
> py
>
>
> - Original Message -
> From: "Paul - Zenith Tech Inc" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, November 09, 2001 11:26 AM
> Subject: [PHP] Classes Question
>
>
> > I'm hoping somebody has the answer to this!
> >
> > I have 3 pages, one a normal PHP page, and 2 which are classes.
> >
> > One class, is a MySQL class I have written to connect/update users, etc
> > And the other is the manage users on the system.
> >
> > Is there a way I can get the "users" class to talk to the "mysql" class?
> >
> > I have this code to make a new instance of the MySQL class (the True
means
> > use persistent connections) and a new instance of the users class
> >
> > $db = new MySQL(True);
> > $users = new Users();
> >
> > I am then using this code to check the list of banned users
> >
> > $users->CheckBannedUser("spacetowns",$db);
> >
> >  In the CheckBannedUser function, I have this
> >
> > $db->sql_query("SELECT user FROM banned_users");
> >
> > But that does not work, (it works fine when used from the standard PHP
> page)
> >
> > Is it not possible to do what I am trying to do?
> > Or am I doing it all wrong?
> >
> > Many thanks,
> > Paul
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] apache + ftp!

2001-11-12 Thread Benjamin

hey group!

i have apache installed on an win2000 machine and now i need an good and
stable ftp server! which one does i take!

thank you, ben




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Save to Desktop

2001-11-12 Thread Sharat Hegde

Hi Matt,

Thanks. That was very useful and it worked like a gem!

Three cheers to HTTP headers. Where do you get a simplified version of the
HTTP Header documentation - The W3C specs do not look like interesting
reading.

Regards,
Sharat Hegde
Phone: 6560360 Ext 4680


-Original Message-
From: Matt McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 12, 2001 2:25 PM
To: Sharat Hegde
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Save to Desktop


On Mon, Nov 12, 2001 at 11:14:04AM +0530, Sharat Hegde wrote:

> Hello,
> 
> I need to capture the contents of a Form into a text file format and
> automatically allow the user to Save the file to his desktop.
> 
> Here is what I am intending to do:
> * Capture the form contents and save to a temporary file. This works fine.
> * Provide some method of the user automatically downloading this. How do I
> get this download to happen?
> 
> I want the screen which says "Open File or Save" to come up and then the
> user can basically save to his desktop.

It's not even necessary to save the form data to a file on the server
if you're just going to remove it after the user downloads the text
file.  The key to this is knowing the proper HTTP headers to send, to
inform the browser that it should download a file.  Then simply print
the desired form data to stdout, and it'll be fed into the file that
the user saves.

For example:


  
First:  
Seond: 



Here, the form takes in two text strings, and offers them to the
browser as a file.

Matt
*
Disclaimer: The information in this e-mail and any attachments is
confidential / privileged. It is intended solely for the addressee or
addressees. If you are not the addressee indicated in this message, you may
not copy or deliver this message to anyone. In such case, you should destroy
this message and kindly notify the sender by reply email. Please advise
immediately if you or your employer does not consent to Internet email for
messages of this kind.
*

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] PHP/MySQL

2001-11-12 Thread Richard Black

Try putting single quotes around the strings:
$Query = "INSERT INTO table_name (Obj,Descrip) VALUES ('keyboard','Device
to pound on when frustrated.')";

Another thing that would be useful is to use the mysql_error() function in your die, 
which will give a better indication of the problem

-Original Message-
From:   phantom [SMTP:[EMAIL PROTECTED]]
Sent:   12 November 2001 09:50
To: [EMAIL PROTECTED]
Subject:[PHP] PHP/MySQL

New to this, trying to insert record into DB

$Query = "INSERT INTO table_name (Obj,Descrip) VALUES (keyboard,Device
to pound on when frustrated.)";
$Results = mysql_query($Query)
or die ("Query FAILED");

I keep getting Failed Query messages here, any idea why?  PHP/MySQL
manuals do not have examples of how to do this.  Thanks.




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP/MySQL

2001-11-12 Thread Morten Winkler Jørgensen


p> $Query = "INSERT INTO table_name (Obj,Descrip) VALUES (keyboard,Device
p> to pound on when frustrated.)";
p> $Results = mysql_query($Query)
p> or die ("Query FAILED");
need to embed your strings in "" like

$Query = "INSERT INTO table_name (Obj,Descrip) VALUES (\"keyboard\",\"Device
to pound on when frustrated.\")";


-- 
Kind regards,
  Morten Winkler



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PHP/MySQL

2001-11-12 Thread phantom

New to this, trying to insert record into DB

$Query = "INSERT INTO table_name (Obj,Descrip) VALUES (keyboard,Device
to pound on when frustrated.)";
$Results = mysql_query($Query)
or die ("Query FAILED");

I keep getting Failed Query messages here, any idea why?  PHP/MySQL
manuals do not have examples of how to do this.  Thanks.




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Login Verification - snag!

2001-11-12 Thread Morten Winkler Jørgensen

I hate to have to duplicate the file with different permissions
AMK> just so that the process can read it when it needs to.

How about persorm a exec("su username password") grabbing the output?
Or something like that...





-- 
Kind regards,
  Morten Winkler



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Login Verification - snag!

2001-11-12 Thread Ashley M. Kirchner


I just realized I jumped the gun on myself with my question
earlier.  /etc/shadow isn't accessible by anyone but root.  With that
said, how can I build a login page in PHP, running as the web server
daemon process, that can validate the user against the system's shadow
file?  I hate to have to duplicate the file with different permissions
just so that the process can read it when it needs to.

--
H | "Life is the art of drawing without an eraser." - John Gardner
  +
  Ashley M. Kirchner    .   303.442.6410 x130
  Director of Internet Operations / SysAdmin. 800.441.3873 x130
  Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave, #6
  http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Unix timestamp ?

2001-11-12 Thread _lallous

timestamp is an integer.
you can convert it to hex string via sprintf("%x", timestamp) and store it.
so if timestamp is a 32bit integer than it's hexadecimal representation will
take 8 characters.

"De Necker Henri" <[EMAIL PROTECTED]> wrote in message
3A8ED7A62794D311AA7700508B6164EC08DCA384@SCPTS01">news:3A8ED7A62794D311AA7700508B6164EC08DCA384@SCPTS01...
> What is the max. size of a timestamp in vanchar value ?
> I have seen it varies between 9 & 10.Will it be bigger than 10 or not ?



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Save to Desktop

2001-11-12 Thread Matt McClanahan

On Mon, Nov 12, 2001 at 11:14:04AM +0530, Sharat Hegde wrote:

> Hello,
> 
> I need to capture the contents of a Form into a text file format and
> automatically allow the user to Save the file to his desktop.
> 
> Here is what I am intending to do:
> * Capture the form contents and save to a temporary file. This works fine.
> * Provide some method of the user automatically downloading this. How do I
> get this download to happen?
> 
> I want the screen which says "Open File or Save" to come up and then the
> user can basically save to his desktop.

It's not even necessary to save the form data to a file on the server
if you're just going to remove it after the user downloads the text
file.  The key to this is knowing the proper HTTP headers to send, to
inform the browser that it should download a file.  Then simply print
the desired form data to stdout, and it'll be fed into the file that
the user saves.

For example:


  
First:  
Seond: 



Here, the form takes in two text strings, and offers them to the
browser as a file.

Matt

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Unix timestamp ?

2001-11-12 Thread De Necker Henri

What is the max. size of a timestamp in vanchar value ?
I have seen it varies between 9 & 10.Will it be bigger than 10 or not ?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] imap_mail_compose correct?

2001-11-12 Thread Martin Gutbrod

Hello,

does anybody have experience with function imap_mail_compose() ??

There is an example in the documentation but in my
script the "description" doesn't work. So the filename of the attachement
is not avaliable.

And why starts the $body-Array with $body[1] and not with body[0] ?

Martin

The System:
PHP Version 4.0.4pl1;
IMAP Support enabled
IMAP c-Client Version 4.1

The Script:
 ...
 // Anlagen
 $n=count($HTTP_POST_FILES["email_anlage"]["tmp_name"]);
 if ($n>1 || ($n==1 &&
file_exists($HTTP_POST_FILES["email_anlage"]["tmp_name"][0]))) {
  // multipart!!!
  $body[1]["type"]=TYPEMULTIPART;
  $body[1]["subtype"]="mixed";
  // Eingabetext
  $body[2]["type"]=TYPETEXT;
  $body[2]["subtype"]="plain";
  $body[2]["description"]=$email_betreff;
  $body[2]["contents.data"]=$email_text;
  for ($i=0;$i<$n;$i++) {
   $j=$i+3;
   $regs=array();
   if
(!ereg("(.*)/(.*)",$HTTP_POST_FILES["email_anlage"]["type"][$i],$regs)) {
$regs[1]=TYPEAPPLICATION;
$regs[2]="octet-stream";}
   else {
$mime_type=array("TEXT"=>0, "MULTIPART"=>1, "MESSAGE"=>2,
"APPLICATION"=>3, "AUDIO"=>4, "IMAGE"=>5, "VIDEO"=>6, "OTHER"=>7);
$regs[1]=strtoupper($regs[1]);
$regs[1]=$mime_type["$regs[1]"];}
   $body[$j]["description"]=$HTTP_POST_FILES["email_anlage"]["name"][$i];
   $body[$j]["type"]=$regs[1];
   $body[$j]["subtype"]=$regs[2];
   $body[$j]["encoding"]=ENCBINARY;
   $fp=fopen($HTTP_POST_FILES["email_anlage"]["tmp_name"][$i],"r");

$body[$j]["contents.data"]=fread($fp,filesize($HTTP_POST_FILES["email_anlage
"]["tmp_name"][$i]));
   fclose($fp);}
  $email_text=imap_mail_compose($envelope,$body);}

...



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Everything between something becomes an array element

2001-11-12 Thread ArsenKirillov

U question  was :
Everything __between something___ becomes an array element

What is wrong with answer :
tag[1]= foobar
tag[2]= foobar

 :-)))


AK>-Original Message-
AK>From: Andrey Hristov [mailto:[EMAIL PROTECTED]]
AK>Sent: Tuesday, November 06, 2001 5:18 PM
AK>To: [EMAIL PROTECTED]
AK>Cc: [EMAIL PROTECTED]
AK>Subject: Re: [PHP] Everything between something becomes an array element
AK>
AK>
AK>But  watch this...
AK>
AK>foobartr>
AK>foo bar
AK>
AK>
AK>I think that the return result will be
AK>foobar
AK>foo bar
AK>
AK>Why? Beacuse you set PCRE to be greedy. I think that there is no 
AK>easy way to 
AK>solve the problem with nested  tags.
AK>
AK>Regards,
AK>
AK>Andrey Hristov
AK>Web Developer
AK>Icygen Corporation
AK>BUILDING SOLUTIONS
AK>http://www.icygen.com
AK>
AK>
AK>On Tuesday 06 November 2001 02:57 am, you wrote:
AK>> Here is right implememtation of all i see
AK>>
AK>> > $co=0;
AK>> $str="foobar";
AK>> echo "";
AK>> GetTagElements($str);
AK>> echo "";
AK>>
AK>> function GetTagElements($str)
AK>> {
AK>> global $co;
AK>> if ($co++){echo "tag[".($co-1)."]= ".htmlentities($str)."";}
AK>>
AK>>
AK>> 
AK>$how=preg_match_all('~\(.*)<\/tr\>~',$str,$var_match,PREG_SE
AK>T_ORDER);
AK>> if ($how)
AK>> for ($i=1;$i> {
AK>> GetTagElements($vr[$i]);
AK>> }
AK>> else return 0;
AK>> }
AK>>
AK>> ?>
AK>>
AK>> > -Original Message-
AK>> > From: Andrey Hristov [mailto:[EMAIL PROTECTED]]
AK>> > Sent: Monday, November 05, 2001 11:13 PM
AK>> > To: [EMAIL PROTECTED]
AK>> > Subject: Re: [PHP] Everything between something becomes an 
AK>array element
AK>> >
AK>> >
AK>> > Sorry
AK>> >
AK>> > $how=preg_match_all('|\(.*?)|',$the_big_string,$matches,
AK>> > PREG_SET_O
AK>> > RDER);
AK>> >
AK>> > is the correct I think
AK>> >
AK>> > Excuses
AK>> >
AK>> > On Monday 05 November 2001 08:57 am, you wrote:
AK>> > >   It gives me an error:
AK>> > >
AK>> > > Warning: Compilation failed: nothing to repeat at offset 7 in
AK>> > > c:\www\innocenti\teste.php on line 17
AK>> > >
AK>> > >  I think that 'offset' is like a letter from the regex, but I
AK>> >
AK>> > could not fix
AK>> >
AK>> > > it...
AK>
AK>-- 
AK>
AK>-- 
AK>PHP General Mailing List (http://www.php.net/)
AK>To unsubscribe, e-mail: [EMAIL PROTECTED]
AK>For additional commands, e-mail: [EMAIL PROTECTED]
AK>To contact the list administrators, e-mail: [EMAIL PROTECTED]
AK>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: mail() w/ mailing lists

2001-11-12 Thread Henrik Hansen

[EMAIL PROTECTED] (_lallous) wrote:

 > Hello,
>
 > Is is advisable that I mail lots of users from a database via one call to
 > mail() ?

why not make a loop and send to one email at a time. if you have over
1000 I would use something else than mail(), ex direct to smtp with sockets.

 > Is there is a way to tell if the mail was returned because the email address
 > was invalid?

you can do a syntax check on the email before sending, but AFAIK you
cant check if the email address exists on the domain you are sending
to (bacause not all mailsevers give that info / not all sysadmins want
to give that info).

-- 
Henrik Hansen

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Login verification

2001-11-12 Thread Jack Dempsey

i would think you could just use crypt() to check the pass against what you
read in from the file

-Original Message-
From: Ashley M. Kirchner [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 12, 2001 2:27 AM
To: PHP-General List
Subject: [PHP] Login verification



I want to make a login page in PHP, which will check the
user/password against the system's user/password file (in my case,
/etc/passwd and /etc/shadow.)  With the machine running PAM, how can I
have PHP do this?

Keep in mind I don't need to modify anything, just verify the
login.  Once verified, the script either continues on to doing other
things, or it bombs with a bad login page.

--
H | "Life is the art of drawing without an eraser." - John Gardner
  +
  Ashley M. Kirchner    .   303.442.6410 x130
  Director of Internet Operations / SysAdmin. 800.441.3873 x130
  Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave, #6
  http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




<    1   2