/    Sign up×
Community /Pin to ProfileBookmark

scripts that run in the background

how would one go about making scripts that run in the background?

for example, if a user has not logged in for 2 weeks, the account deletes without me having to manually do anything (other then write the code of for it to delete, of course)

to post a comment
PHP

3 Comments(s)

Copy linkTweet thisAlerts:
@valenokOct 01.2007 — cron

But you may leave that operations to working scripts such as login.php
Copy linkTweet thisAlerts:
@ixxalnxxiauthorOct 01.2007 — valenok, can you rephrase what you are saying please?

i may leave what operations ?
Copy linkTweet thisAlerts:
@valenokOct 01.2007 — login.php

[code=php]
<?php

// Now do whatever you want


mysql_query("DELETE * FROM tbl WHERE logintime<123456 ");





// Make login
$login = mysql_escape_string($_GET['login']);
$login = mysql_escape_string($_GET['pass']);

$q = mysql_query("SELECT id FROM tbl WHERE login='".$login."' AND pass='".$pass."'");

if(mysql_num_rows($q==1))
{
$_SESSION['id'] = mysql_result($q,0,0);
echo "Hello Johny";
}
else
echo "hacker? he he.."


[/code]
×

Success!

Help @ixxalnxxi spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...