August 16th, 2000, 01:15 AM
im making an auction site, and im almost done.. Only one thing. I need the script to send the user who has won and listed the auction email, right when it ends... I dont know how to do this within php. Unless i embed it inside the each auction's page, but this will make it so it only sends if someone visits the page. How can i make it so it does it automatically when the auction ends?
August 16th, 2000, 06:25 AM
Are we to assume that your entire auction is conducted in PHP? Does that mean that no auction data is stored outside of the webpage? This doesn't quite seem logical. However, if this is not the case, then the e-mail should be handled by the back-end servers.
August 16th, 2000, 02:32 PM
I would suggest writing a script in C or Visual Basic that looks at your database every 5 minutes or so for complete auctions. From there you can do whatver you want..
Aristotle concluded that those who admit their stupidity are truly wise.
Gil Hildebrand Jr
4atcost.com Senior Web Developer
August 18th, 2000, 10:32 PM
no i do not use just php obviously... mySQL is used quite a bit . As for your VB program or C program, i know both of these languages fairly well, but have never used them in this type of situation. Mainly graphics programming and gaming. Care to insight me into how i might do what you have described?
August 19th, 2000, 03:28 AM
is there an event that triggers the end of an auction? how do you know when an auction is over? it should be easy to include() a conditional script at this point - assuming that the end of an aution is triggered by a user action.
Can you tell us any more?
August 19th, 2000, 01:20 PM
The auction ends 1/3/5/7 days after it is posted. So, once the time of the auction has expired, i need the email to be sent. There is no user triggering involved to end the auction. If there was, this would be easy. Duh. What i need is a server side script to send out emails to the top bidder/seller of each auction which has already completed. Quickly after it has completed.
August 19th, 2000, 01:44 PM
You need to set up a cron job (assuming your server runs *nix).
You can write a script in PHP that is called every so often by cron which will check for closed auctions and send your email.
Do a search for cron for more info.
August 19th, 2000, 07:46 PM
thanks man. i found a good thread on it, and i intend to give it a try.