NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page $5 USD for a working script

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 12-14-2005, 09:30 AM THREAD STARTER               #1 (permalink)
DNOA Member
Join Date: May 2004
Posts: 5,040
mholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant future
 


Autism Marrow Donor Program 9/11/01 :: Never Forget Multiple Sclerosis Adoption Alzheimer's Lou Gehrig's Disease (ALS)

Caution $5 USD for a working script


Hello,
????: NamePros.com http://www.namepros.com/programming/148020-5-usd-for-a-working-script.html

I need a PHP script that goes through all rows in a table and:

A) If the field "last_login" is 20 days old or more, it sends an email to the user, email field being "email" notifying that he/she has 10 days to do login to his/her account to keep it from being deleted.

B) DELETES the row if the "last_login" field is 30 days old or more.

The catch? This must be tested on YOUR OWN SERVER!

I want to see a WORKING SAMPLE - this script is for www.VirtualDN.com - and I simply cannot risk a script glitch on my own server.

The dates are stored in this PHP date() format: F d, Y

That's:

February 02, 2005

...similar to that. Convert it if you must but I need it to be bug-free.

Thanks for anybody who can do this... $5 will be sent via PayPal to a working script.
-Matt
mholt is offline  
Old 12-14-2005, 09:52 AM   #2 (permalink)
sjp
NamePros Member
 
sjp's Avatar
Join Date: Oct 2005
Location: Andromeda
Posts: 136
sjp is on a distinguished road
 



You didn't give enough information (name of the user, mysql type of the date, database type, ...) but you can use this to create your own script:

PHP Code:
<?

$link 
mysql_connect('localhost''root''');

if (!
$link)
{
    die(
"Can't connect: " mysql_error());
}
else
{
    
mysql_select_db('foo');

    echo 
"Deleting users who didn't log in during the last 30 days<br />";
????: NamePros.com http://www.namepros.com/showthread.php?t=148020
    
    
mysql_query("delete from user_table where date_sub(curdate(), interval 30 day) > last_login");
    
    
$result mysql_query("select id, email from user_table where date_sub(curdate(), interval 20 day) > last_login");
    
    if (!
$result)
    {
        die(
"Error: Invalid query: " mysql_error());
    }
    
    echo 
"Sending mail top users who didn't log in during the last twenty days:<br />";
    
    while (
$row mysql_fetch_assoc($result))
    {
        if (
mail($row['email'], "Log in""Or your account is killed"))
        {
            echo 
'Sent mail to user with ID ' $row['id'] . "<br />";
        }
        else
        {
            echo 
'Mailing user with ID ' $row['id'] . " failed <br />";
????: NamePros.com http://www.namepros.com/showthread.php?t=148020
        }
    }
}

?>
sjp is offline  
Old 12-14-2005, 01:14 PM THREAD STARTER               #3 (permalink)
DNOA Member
Join Date: May 2004
Posts: 5,040
mholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant future
 


Autism Marrow Donor Program 9/11/01 :: Never Forget Multiple Sclerosis Adoption Alzheimer's Lou Gehrig's Disease (ALS)
I told you the type of date - F d, Y which really only fits in VARCHAR... use some logic. Database type... MySQL .... really: What other database system implements w/ PHP so well and is used so commonly?

I am not willing to buy a script from somebody that does not know what they're doing. Please write an original script for you to get your $5 - again it must be tested on your own server.
mholt is offline  
Old 12-14-2005, 01:20 PM   #4 (permalink)
sjp
NamePros Member
 
sjp's Avatar
Join Date: Oct 2005
Location: Andromeda
Posts: 136
sjp is on a distinguished road
 



Originally Posted by compuXP
I am not willing to buy a script from somebody that does not know what they're doing.
I really appreciate 15 year olds who store timedate stamps in varchar fields telling me I don't know what I'm doing. The script works well (assuming you knew how to set up database tables, which you unfortunately don't) and it's tested on my server.
????: NamePros.com http://www.namepros.com/showthread.php?t=148020

Edit: Here, because I'm a nice guy: Look into the MySQL cast operator to create a workaround for your horrible table design. Something like "select cast(last_login as date) from table". Maybe you're lucky and that works.
Last edited by sjp; 12-14-2005 at 01:27 PM.
sjp is offline  
Old 12-14-2005, 02:00 PM THREAD STARTER               #5 (permalink)
DNOA Member
Join Date: May 2004
Posts: 5,040
mholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant future
 


Autism Marrow Donor Program 9/11/01 :: Never Forget Multiple Sclerosis Adoption Alzheimer's Lou Gehrig's Disease (ALS)
I'm glad you appreciate the fact that I told you that you don't know what you're doing. Your welcome.

And, obviously you don't know what you're doing since I specifically ask that I see a sample of it.

Now bug off and I would appreciate it if somebody else could follow my criteria.
mholt is offline  
Old 12-14-2005, 03:32 PM   #6 (permalink)
NamePros Member
Join Date: Dec 2005
Posts: 99
UKMatt is an unknown quantity at this point
 



lol


lol, after talking to him like that ... do you really expect someone to help you ???
UKMatt is offline  
Old 12-14-2005, 04:14 PM   #7 (permalink)
mch
NamePros Regular
Join Date: Nov 2005
Location: EU
Posts: 248
mch is on a distinguished road
 



Yeah, you need to post the table structure at least. And honestly, if this is such a critical thing for you (and obviously it is and you can't risk screwing up your server/database/site), I think you should offer more.

BTW, sjp's solutions looks fine to me (different coding style, though ).
mch is offline  
Old 12-14-2005, 04:17 PM THREAD STARTER               #8 (permalink)
DNOA Member
Join Date: May 2004
Posts: 5,040
mholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant future
 


Autism Marrow Donor Program 9/11/01 :: Never Forget Multiple Sclerosis Adoption Alzheimer's Lou Gehrig's Disease (ALS)
Table structure ... why? I give you the fields that are used ...
mholt is offline  
Old 12-16-2005, 02:50 PM   #9 (permalink)
jdk
Senior Member
 
jdk's Avatar
Join Date: Jul 2004
Location: Florida
Posts: 1,492
jdk has a reputation beyond reputejdk has a reputation beyond reputejdk has a reputation beyond reputejdk has a reputation beyond reputejdk has a reputation beyond reputejdk has a reputation beyond reputejdk has a reputation beyond reputejdk has a reputation beyond reputejdk has a reputation beyond reputejdk has a reputation beyond reputejdk has a reputation beyond repute
 



Wow, very interesting thread. Let me get right on this for you.
__________________
All offers are valid for 12 hours unless otherwise stated.
jdk is offline  
Old 12-16-2005, 02:57 PM THREAD STARTER               #10 (permalink)
DNOA Member
Join Date: May 2004
Posts: 5,040
mholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant future
 


Autism Marrow Donor Program 9/11/01 :: Never Forget Multiple Sclerosis Adoption Alzheimer's Lou Gehrig's Disease (ALS)
THANK you! Many thanks again. I look forward to seeing your results
mholt is offline  
Old 12-18-2005, 05:38 PM THREAD STARTER               #11 (permalink)
DNOA Member
Join Date: May 2004
Posts: 5,040
mholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant future
 


Autism Marrow Donor Program 9/11/01 :: Never Forget Multiple Sclerosis Adoption Alzheimer's Lou Gehrig's Disease (ALS)
Any progress?

Btw, jdk, how am I supposed to reply to your PM when you have disabled Private Messages?
mholt is offline  
Old 12-18-2005, 05:58 PM   #12 (permalink)
jdk
Senior Member
 
jdk's Avatar
Join Date: Jul 2004
Location: Florida
Posts: 1,492
jdk has a reputation beyond reputejdk has a reputation beyond reputejdk has a reputation beyond reputejdk has a reputation beyond reputejdk has a reputation beyond reputejdk has a reputation beyond reputejdk has a reputation beyond reputejdk has a reputation beyond reputejdk has a reputation beyond reputejdk has a reputation beyond reputejdk has a reputation beyond repute
 



I sent an email to tech to find out why since in my options it says they are enabled.
__________________
All offers are valid for 12 hours unless otherwise stated.
jdk is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Huge Script Pack for $5 with Resale Rights dsforsaken Scripts For Sale 32 12-03-2005 09:46 PM
[urgent] Help! Mass_Add script not working for olate WuLabsWuTecH Programming 0 04-23-2005 03:49 PM
Domain Parking Script ezimedia Parking & Traffic Monetization 3 03-03-2004 12:17 AM

Liquid Web Smart Servers  
All times are GMT -7. The time now is 02:34 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger