Okay, my personal site-- SuperPower2.com--
has received TONs of hits, from over
25 different countries, a good chunk being in the Western Europe area.
Anyways, a good handful of people are
translating the site for me, into
French and Dutch, though the French one is done
Point is-- how do I make it so the contact
form for the int'l vers. of the site pick
a random email address ?
Basicly put a handful into the
script and then PHP randomly picks
which one to send the email to.
This way-- nobody gets 2much work
while the other guy(s) get nothing
Anyways-- 2tired to test, and still
gotta get started on coding the french
version into reality
Thanks for all help
Cheers.what about using an array to store all your email addresses in. then use the rand function to generate a random number and match it to a value in the array... maybe it will work can't do the code no PHP parser at work
rand function <!-- m --><a class="postlink" href="http://www.php.net/manual/en/function.rand.php">http://www.php.net/manual/en/function.rand.php</a><!-- m -->
array function <!-- m --><a class="postlink" href="http://www.php.net/manual/en/function.array.php">http://www.php.net/manual/en/function.array.php</a><!-- m -->
may give you a few ideas on how to do thisSuggestion:
Store each of the email address in a table with a timestamp. As the email address is retrieved and used update the timestamp. Always use the email with oldest timestamp. not that good with mySQL to
do that, torrent so
Man I've never used Array() nor rand()
any tutorials on 'em for me to look @???The MySQL part shouldn't be that hard.
All you would need is maybe a column for id that is auto_increment, then a varchar column for email, then a table with the timestamp type.
And then whenever a certain email is used you could use whatever the MySQL function is to insert the newest timestamp. And in your WHERE statement you could figure out what timestamp is the oldest...you could probably do this by using ORDER BY and LIMIT, there may be an easier way though.
Here's a good tutorial on arrays
<!-- m --><a class="postlink" href="http://www.snippetlibrary.com/viewtut.php/2/18/160">http://www.snippetlibrary.com/viewtut.php/2/18/160</a><!-- m -->
has received TONs of hits, from over
25 different countries, a good chunk being in the Western Europe area.
Anyways, a good handful of people are
translating the site for me, into
French and Dutch, though the French one is done
Point is-- how do I make it so the contact
form for the int'l vers. of the site pick
a random email address ?
Basicly put a handful into the
script and then PHP randomly picks
which one to send the email to.
This way-- nobody gets 2much work
while the other guy(s) get nothing
Anyways-- 2tired to test, and still
gotta get started on coding the french
version into reality
Thanks for all help
Cheers.what about using an array to store all your email addresses in. then use the rand function to generate a random number and match it to a value in the array... maybe it will work can't do the code no PHP parser at work
rand function <!-- m --><a class="postlink" href="http://www.php.net/manual/en/function.rand.php">http://www.php.net/manual/en/function.rand.php</a><!-- m -->
array function <!-- m --><a class="postlink" href="http://www.php.net/manual/en/function.array.php">http://www.php.net/manual/en/function.array.php</a><!-- m -->
may give you a few ideas on how to do thisSuggestion:
Store each of the email address in a table with a timestamp. As the email address is retrieved and used update the timestamp. Always use the email with oldest timestamp. not that good with mySQL to
do that, torrent so
Man I've never used Array() nor rand()
any tutorials on 'em for me to look @???The MySQL part shouldn't be that hard.
All you would need is maybe a column for id that is auto_increment, then a varchar column for email, then a table with the timestamp type.
And then whenever a certain email is used you could use whatever the MySQL function is to insert the newest timestamp. And in your WHERE statement you could figure out what timestamp is the oldest...you could probably do this by using ORDER BY and LIMIT, there may be an easier way though.
Here's a good tutorial on arrays
<!-- m --><a class="postlink" href="http://www.snippetlibrary.com/viewtut.php/2/18/160">http://www.snippetlibrary.com/viewtut.php/2/18/160</a><!-- m -->