PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 19th, 2000, 02:33 AM
Shiju Rajan's Avatar
Shiju Rajan Shiju Rajan is offline
.Net Developer
Dev Shed Novice (500 - 999 posts)
 
Join Date: Feb 2000
Location: London
Posts: 987 Shiju Rajan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 26 m 22 sec
Reputation Power: 14
Send a message via MSN to Shiju Rajan Send a message via Yahoo to Shiju Rajan

i want to do an autorespondent in PHP3.0.
i have a datebase called "birthdates".

In that people can enter their date of births.An email should generate automatically reminding the user about his birthday.That might be before 1-2 weeks before his birthday.

How can i do it???,Do you have any idea???.







------------------
shiju

Reply With Quote
  #2  
Old February 19th, 2000, 03:05 AM
'tantrum 'tantrum is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2000
Posts: 79 'tantrum User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 14
Hi, I'm not sure if this would work....but no-one else has answered you so i'll give it a go

Have a page which you go to once a day or find a way u can auto load it once a day which is like this...

<?
$date = date ("d-m-Y"); //look up date() function at php.net for formating procedures

mysql_connect('localhost','login','password' );
$query = "select * from table where birthdate='$date'";
$result=mysql_db_query("database",$query);
while ($row=mysql_fetch_object($result))

$message = "hey $row->name, its your birthday, come to www.dmusic.com.au and you will receive a present heh";

mail("$row->email","Happy Birthday $row->name !","$message");

mysql_free_result($result);
?>

If you have any questions just leave them here.


Good luck
Basil

Reply With Quote
  #3  
Old February 19th, 2000, 04:06 AM
Shiju Rajan's Avatar
Shiju Rajan Shiju Rajan is offline
.Net Developer
Dev Shed Novice (500 - 999 posts)
 
Join Date: Feb 2000
Location: London
Posts: 987 Shiju Rajan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 26 m 22 sec
Reputation Power: 14
Send a message via MSN to Shiju Rajan Send a message via Yahoo to Shiju Rajan
Thank you tantrum,

I know how to do the database program for that...

But...

i would like to know one thing,

Is thier any other way to run this program daily with out our intraction???.

If it has any other option please tell me!!!

Thanks alot!!!!






Reply With Quote
  #4  
Old February 19th, 2000, 05:56 AM
rod k rod k is offline
Apprentice Deity
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Jul 1999
Location: Niagara Falls (On the wrong side of the gorge)
Posts: 3,237 rod k User rank is Private First Class (20 - 50 Reputation Level)rod k User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 m 8 sec
Reputation Power: 17
Send a message via AIM to rod k
If you are runnin unix or linux you can do a cron job.

Reply With Quote
  #5  
Old February 20th, 2000, 10:56 AM
tonyds tonyds is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2000
Location: Johannesburg, South Africa
Posts: 10 tonyds User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
do you meen one can set a cron job to run the .php3 page - or must one use mysql commands - how would one for example make the above page run automatically with CRON?


Reply With Quote
  #6  
Old February 20th, 2000, 11:53 PM
Shiju Rajan's Avatar
Shiju Rajan Shiju Rajan is offline
.Net Developer
Dev Shed Novice (500 - 999 posts)
 
Join Date: Feb 2000
Location: London
Posts: 987 Shiju Rajan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 26 m 22 sec
Reputation Power: 14
Send a message via MSN to Shiju Rajan Send a message via Yahoo to Shiju Rajan

How can i do cron job for executing my php file once in every day????.

can you tell me syntax????

------------------
shiju

Reply With Quote
  #7  
Old February 27th, 2000, 06:22 PM
kourou kourou is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 1999
Location: London UK
Posts: 7 kourou User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
this is an example of a cron job you could use if you only have mod_php:

59 23 * * * lynx -dump http://www.server.com/script.php3>>/var/log/messages

basically use lynx to simulate visiting a page. you might want to worry about security here: perhaps the script referred to should only be accessible to localhost.

in httpd.conf you could use:
#
<Directory /secret/scripts>
Order allow,deny
Allow from localhost
</Directory>
#

if you have access to cgi php you could simply write the php script, placing

#!/pathto/php

at the top. then the cron would be:

59 23 * * * /path/to/your/script

hope this helps...

Reply With Quote
  #8  
Old February 28th, 2000, 02:15 AM
Shiju Rajan's Avatar
Shiju Rajan Shiju Rajan is offline
.Net Developer
Dev Shed Novice (500 - 999 posts)
 
Join Date: Feb 2000
Location: London
Posts: 987 Shiju Rajan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 26 m 22 sec
Reputation Power: 14
Send a message via MSN to Shiju Rajan Send a message via Yahoo to Shiju Rajan
Hi kourou,

I am not able to reach that URL which you given in your answer.

i am not able to understand the script which you given in your answer as well.


can you explain it clearly????.

Is it possible to write a shell program for the same action???

Thank you



Reply With Quote
  #9  
Old February 28th, 2000, 11:30 AM
TroutMask TroutMask is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2000
Location: Englewood, CO
Posts: 30 TroutMask User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 14
You could create a Perl script to retrieve the data from the database and use sendmail (or other email app) to send to the address. You'll use the Perl DBI module with the MySQL driver (DBD). The documentation for DBI shows how to connect, execute a query and retrieve records.

-TM

Reply With Quote
  #10  
Old February 28th, 2000, 02:21 PM
jodonnell jodonnell is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2000
Location: durham, nc, usa
Posts: 14 jodonnell User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to jodonnell
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by Shiju Rajan:

i want to do an autorespondent in PHP3.0.
i have a datebase called "birthdates".

In that people can enter their date of births.An email should generate automatically reminding the user about his birthday.That might be before 1-2 weeks before his birthday.

How can i do it???,Do you have any idea???.

[/quote]

I believe your question was answered quite well. I am very interested in this project, however. Is this sponsored by MicroSoft, or is there a Government grant to develop an application that helps folks remember their birthdays?



Reply With Quote
  #11  
Old February 29th, 2000, 04:50 AM
Shiju Rajan's Avatar
Shiju Rajan Shiju Rajan is offline
.Net Developer
Dev Shed Novice (500 - 999 posts)
 
Join Date: Feb 2000
Location: London
Posts: 987 Shiju Rajan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 26 m 22 sec
Reputation Power: 14
Send a message via MSN to Shiju Rajan Send a message via Yahoo to Shiju Rajan
Hi jodonnell,

Thank you for your interest in my question.

Actually i am doing this project for one of my client(freelance).

you may see the site at: http://www.reminder2u.com


Thanks alot



------------------
shiju

Reply With Quote
  #12  
Old March 7th, 2000, 06:23 AM
Shiju Rajan's Avatar
Shiju Rajan Shiju Rajan is offline
.Net Developer
Dev Shed Novice (500 - 999 posts)
 
Join Date: Feb 2000
Location: London
Posts: 987 Shiju Rajan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 26 m 22 sec
Reputation Power: 14
Send a message via MSN to Shiju Rajan Send a message via Yahoo to Shiju Rajan
Hello kourou,

i have not solved my problem yet.I have finshed the programming part but now i want to execute cron job for sending reminders.

<<<if you have access to cgi php you could simply write the php script, placing

#!/pathto/php

at the top. then the cron would be:

59 23 * * * /path/to/your/script

hope this helps...
>>>

can you tell me one thing ,

how can i find out whether i have the access to cgi php ?,

Is it possible to execute the cron job through telnet??..

Pls give me an answer.

Thank you



Reply With Quote
  #13  
Old March 7th, 2000, 07:21 AM
masood masood is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2000
Location: Toronto, Canada
Posts: 13 masood User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
your questions regarding cronjob or php3.cgi can be better answered by system administrator of your server machine.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > How can i do autorespondent in PHP?-can you help me??

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap