php-windows Digest 29 Oct 2002 22:13:57 -0000 Issue 1413
Topics (messages 16606 through 16613):
Random Numbers Script
16606 by: Raheel Hussain
16609 by: Stephen Edmonds
Re: configuraton of mail server with PHP/Apache
16607 by: Prachait Saxena
16608 by: Stephen Edmonds
Re:How to prevent error email from being sent?
16610 by: neil smith
Faxing from php
16611 by: Radovan Radic
PHP IIS 5.0 Include files and baldness
16612 by: Craig Blanzy
404 documents
16613 by: DaMouse
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 ---
I want to generate three to Six digit long random numbers
with the foloowing input
1 - length in digits : 4
2 - How many numbers do you want to generate : 4
and then the script runs and generate the following
1220
1282
7324
3343
simillarly
1 - length in digits : 6
2 - How many numbers do you want to generate : 4
and then the script runs and generate the following
321220
321282
447324
643343
etc.
but i cant get to any spot for this , this may be a cheap question for u guys but plz
help
regards
---------------------------------
Do you Yahoo!?
HotJobs - Search new jobs daily now
--- End Message ---
--- Begin Message ---
Generating random numbers is quite easy in php. I suggest using rand( ).
Simply put your upper limits and lower limits in, then it randomly chooses a
number inbetween.
EG: rand( 1, 9 ) generates a random number between 1 and 9. If you want to
be able to control the length, then use rand however many times its needed
$LengthOfRandom = "4";
WHILE ( $LengthOfRandom > 0 ) {
$RandomNumber .= rand( 0,9 );
//The .= means it will add the value on the right on to what already
excists on the left
$LengthOfRandom = $LengthOfRandom - 1;
}
print $LengthOfRandom;
would output random numbers like below
1220
8273
For more infomation, take a look at
http://www.php.net/manual/en/function.rand.php
Hope this helps
Stephen
----- Original Message -----
From: "Raheel Hussain" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, October 29, 2002 7:51 AM
Subject: [PHP-WIN] Random Numbers Script
> I want to generate three to Six digit long random numbers
> with the foloowing input
>
> 1 - length in digits : 4
> 2 - How many numbers do you want to generate : 4
>
> and then the script runs and generate the following
>
> 1220
> 1282
> 7324
> 3343
>
> simillarly
>
> 1 - length in digits : 6
> 2 - How many numbers do you want to generate : 4
>
> and then the script runs and generate the following
>
> 321220
> 321282
> 447324
> 643343
>
> etc.
>
> but i cant get to any spot for this , this may be a cheap question for u
guys but plz help
>
> regards
>
>
>
> ---------------------------------
> Do you Yahoo!?
> HotJobs - Search new jobs daily now
--- End Message ---
--- Begin Message ---
Hello
check out sendmail -t is there in phpinfo it ur using on *uix
and same as for windows
Please write which os ur using and the mail server?
Apache have no problem
Prachait
Dorothy Vankoughnett <[EMAIL PROTECTED]> wrote in message
news:001001c27efa$d11c1ec0$6402f60a@;vansr01...
> HI
>
> not sure if anyone can help on this but am learning the basics of PHP with
> Apache .. am getting errors and pinpointed to this line:
>
> mail($to, $subject, $msg, $mailheaders);
>
> I've looked at Apache set up and cant seem to find any errors in the setup
> ..
>
> Any help with this would be appreciated!
>
> Dorothy VK
--
Bye, and Have a nice day.
Prachait Saxena
---------------------------
Phone :- +91 - 712 - 544476
Email :- [EMAIL PROTECTED]
ICQ :- 71855637
MSN :- [EMAIL PROTECTED]
Yahoo Messenger :- [EMAIL PROTECTED]
If you do for other's !
Other's will do for you !!
Visit me at
http://www.Prachait.Com/
http://www.SitesOnTesting.Com/
--- End Message ---
--- Begin Message ---
Can you also write the error message? It could be you need to turn on your
Mail Server's email redirection - the feature that allows it to send email
on to another system
EG: My local email server gives me an address of [EMAIL PROTECTED]
Trying to send mail to it using php always works, as it is a local email
address. However, when using php to send an email to [EMAIL PROTECTED]
(for example) I need the redirection feature enabled. Otherwise php returns
an error!
Hope this helps
Stephen
--- End Message ---
--- Begin Message ---
Only 20 emails a day ? When I was working on new builds, we regularly got
hundreds of 'template missing' messages a day - I just filtered em into a
mailbox and deleted when I haad fixed the problem :-)
Bloody lightweights - LOL
PS - With reference to your problem - why do the email addresses become
inactive ? How often do you purge your mail database ? Are you a spammer :-?
Its usually a good idea to validate emails by connecting to the mailserver
supplied by the user using a socket, and validate new mail addresses that
way - an error from the mail server and you unceremoniously delete the user
anyway. The other way to validate is of course to send a validation link in
the email such that the user is required to validate their receipt of the
mail against the database - anybody not renewing their a/c in say a week,
gets deleted.
Cheers
Neil Smith.
At 07:22 29/10/2002 +0000, you wrote:
Message-ID: <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
From: "Noah Spitzer-Williams" <[EMAIL PROTECTED]>
Date: Tue, 29 Oct 2002 01:55:53 -0500
Subject: How to prevent error email from being sent?
Hey guys,
My service sends out emails every few days to members who wish to have
stats sent to them. The problem is once an email becomes inactive, I the
webmaster gets a failure email sent to me. This is starting to add up and I
can get upwards of 20 of these a day. It just seems likea waste of space
and bandwidth... is there anyway I can prevent this?
If i delete the webmaster email key in php.ini will my emails not have a
reply address?
Thanks!
- Noah
[EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
Hi
Is there any solution for sending fax through php?
I need to generate document ,get fax number from database and send the
document to the fax number.
There is an example on http://codeproject.com/isapi/aspfax.asp in ASP, but
it dodnt work for me, although i cant say i know much about faxing
softwares.
Radovan
--- End Message ---
--- Begin Message ---
I'm ripping my hair out, mainly because my customer is really getting antsy for this
to work. He has a credit app online running on our NT server under IIS 5.0 It calls
and include file (missing.inc) when it finds an empty field once the form is
submitted. The missing.inc is suppose to say sorry but you left $missing blank.
Instead of doing that, it just reloads the credit app. Any help at all would be much
appreciated.
This is the include file (missing.inc) in it's entirety
<?php
if(!isset($missing)) $missing = "";
echo("<center><font color='#000000' face='verdana'
size='7'><b>Oops!<br><br></font><font color='#000000' face='verdana' size='4'
class='ninept'>The $missing field was not filled out.<br><br></b></font>\n");
echo("<font color='#000000' face='verdana' size='4' class='ninept'><b>Please go <A
HREF='../creditapp.php'>back to the form</A> and fill out the $missing field. Thank
you.</b></font></center>\n");
?>
I did set the include_path in my php.ini I've set it to .\inc;c:\php\includes
It deffinatly seems to be accesing the missing.inc file. If i change the permisions
on missing.inc i can get it to ask me for a password everytime i submit the form,
that's how i know it's tryign to read the file, it just doesn't seem to do anythign
with it.
--- End Message ---
--- Begin Message ---
I there a way to have the .php page pickup the url that was typed in e.g.
usertype= www.mydomain.com/wRongurl
$_SERVER[FILE_NOT_FOUND] = www.domain.com/wRongurl
echo "The lost page was: $_SERVER[FILE_NOT_FOUND]";
--- End Message ---