Re: [PHP] return path of mail function

2006-04-03 Thread sub
> You are better off using the 5th paramater to mail() instead.. > mail($to, $sub, $msg, $headers, "-f $return"); > And what if that doesn't work? Is there a 3rd way of doing it that might work? ~Drew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, v

Re: [PHP] return path of mail function

2006-04-02 Thread sub
[EMAIL PROTECTED] Subject: Test sub X-PHP-Script: www.drewpydraws.com/crap.php for ip address From: Test Reply-To: Test Message-Id: <[EMAIL PROTECTED]> Date: Mon, 03 Apr 2006 00:35:34 -0500 X-Antivirus: AVG for E-mail 7.1.385 [268.3.4/299] Mime-Version: 1.0 Content-Type: text/p

Re: [PHP] return path of mail function

2006-04-02 Thread sub
Safe mode is indeed off and sendmail_from has "no value". I've modified the code as below: $return="test@test.com"; $orig_sendmail_from = ini_get('sendmail_from'); ini_set('sendmail_from', $return); $headers = "From: Test \r\n" . "

Re: [PHP] defined

2006-02-25 Thread sub
Well ain't that a kick in the pants? Works great now, thanks. And now I see the difference between empty() and defined(). Again, many thanks, ~Drew www.drewpydraws.com - Original Message - From: "Philip Hallstrom" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: Sent: Saturday, February

[PHP] defined

2006-02-25 Thread sub
I'm having kind of a weird problem I want $MailSubject to contain a the value "prayer" unless I tell it other wise. // on a form processor. $MailSubject = "Praise"; include_once("mailit.php"); // then in mailit.php include "form2mail.php"; // and in formtomail.php if(!defined($MailSubject)) /

Re: [PHP] problem with Mail function

2006-02-05 Thread sub
This may be a bit to obvious, but I miss little stuff all the time. You wouldn't happen to have the if(mail(...)) in some form of loop would you? or perhaps $to is getting assigned the e-mail address like "[EMAIL PROTECTED] [EMAIL PROTECTED]" can you check the value of $email before you assign it

[PHP] readdir() and files with numbers

2005-09-14 Thread sub
I'm having a really weird problem. My code works, unless the images start with a number, then I get a 500 error. If they start with a letter it's fine. some example of problem files: 178_image.jpg 0005396C.jpg the whole reason I wrote this code was so that I wouldn't have to rename all my file

Re: [PHP] Problem w/ reading a txt file.

2005-09-13 Thread sub
Yeah, I just cut out almost the code that was working fine. My the full code does a bit more than than that. Thanks all, Andrew Darrow Kronos1 Productions www.pudlz.com - Original Message - From: "Burhan Khalid" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: Sent: Tuesday, September

[PHP] Problem w/ reading a txt file.

2005-09-12 Thread sub
Problem w/ reading a txt file. The error I get is "Warning: opendir(/home/pudlz/public_html ): failed to open dir: No such file or directory " Here's my code:: $main = file('folders.txt'); $counter = count($main); for($i=0;$i<$counter;$i++) { if ($handle = opendir("$main[$i]"))

[PHP] date of file?

2005-09-11 Thread sub
In addition to reading the names of the files in a directory, I also need to read the date the file was modified. Right now I've got this: if ($handle = opendir("$path")) { $b=0; while (false !== ($file[$b] = readdir($handle))) { $b++; } closedir($handle); } What funct

Re: [PHP] syntax for multiple boolean

2005-08-27 Thread sub
You could write what your code does now like this. if (empty ($fname) || empty ($sname) || empty ($address)) { // do something } If you want your first condition to be met and one of your second two conditions to be met you can do it like this: if (empty ($fname) && (empty ($sname) || empty ($ad

Re: [PHP] Return Path [SOLVED]

2005-08-06 Thread sub
Works great. Thank you. Although I swear I tried that last night. Eh I probably messed something up. Andrew Darrow Kronos1 Productions www.pudlz.com - Original Message - From: "Sebastian" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: Sent: Saturday, August 06, 2005 6:12 AM Subject:

[PHP] Return Path

2005-08-05 Thread sub
I don't seem to be able to set the "return path" using the mail() function. I can't figure out why "from" will let me set it, but not the return path. $headers = 'From: [EMAIL PROTECTED]' . "\r\n" . 'Return-path: [EMAIL PROTECTED]' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); mail($email,

[PHP] login check

2005-08-04 Thread sub
I think this is the way I need to write my if statement. if ( $min && $user[ "min" ] == $min && $user[ "pin" ] == $pin || $pin == 'allow') $min login name entered by the customer at the form. $user[min] is the login name from my sql db that matches $min $user[pin] is the password from mysql

Re: [PHP] code generation

2005-08-03 Thread sub
Couldn't you use a date check with date()? if(todays date < end date) { load the site } else { the site has expired } Andrew Darrow Kronos1 Productions www.pudlz.com - Original Message - From: "Johan Grobler" <[EMAIL PROTECTED]> To: Sent: Wednesday, August 03, 2005 11:04 PM Subject: [

Re: [PHP] Running a PHP script everyday [SOLVED]

2005-07-31 Thread sub
What a convoluted mess. Rather than using the shebang at the begging of the PHP file I had to put it in the cron command "/usr/local/bin/php public_html/wap/mailer/dailylist.php" It will now run. But then I had to slightly redesign the HTMLMimeMail code. I had to define some of it as functions a

Re: [PHP] Running a PHP script everyday

2005-07-30 Thread sub
My include statment looks like this: include "sending.php"; The ones from MimeMail are: are include(); and require_once(); Heres the response I get when using /usr/local/bin/php: /bin/sh: public_html/wap/mailer/dailylist.php: /usr/local/bin/php : bad interpreter: No such file or directory Maybe

Re: [PHP] Running a PHP script everyday

2005-07-30 Thread sub
I can't figure out how to get into command line access through my webhost. I've tried telnet and it fails. My host uses cPanel. When I setup the crontab it e-mails me back this response: /bin/sh: public_html/wap/mailer/dailylist.php: /usr/bin/php : bad interpreter: No such file or directory I'm

Re: [PHP] Running a PHP script everyday

2005-07-30 Thread sub
In my pevious hunt through cron I didn't even notice the PHP CLI. So I will be figuring that out today probably. My server runs on Linux. Not sure which distro though. I'll have to ask. My script will be getting e-mail addresses from my SQL db and sending them a pic of the day. I got the HTML

Re: [PHP] Help with Functions

2005-07-30 Thread sub
I would recomend for sanity and clean code that you define your functions outside of the file you will be calling it from and include that file in any file you need to call a function from. Here's a function that I defined in my db.php file. /**

[PHP] Running a PHP script everyday

2005-07-30 Thread sub
I have a PHP script that I need to run once a day. I have it currently setup so that I just run it from my cell phone, but I would prefer something automated. I'd looked into a cron job, but that just looks like it's for doing linux command line stuff on my host. I also thought about writing a ne