Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

274
Views
Executing a php function every 30 minutes

this is the function i want to execute with a 30 minute interval between each execution:

$realm = 'Restricted area';
$users = array('admin' => 'admin', 'guest' => 'guest');
$username = validate_digest($realm,$users);

function send_digest($realm) {
    header('HTTP/1.1 401 Unauthorized');
    header('WWW-Authenticate: Digest realm="'.$realm.'",qop="auth",nonce="'.md5(uniqid()).'",opaque="'.md5($realm).'"');
    die('You need to enter a valid username and password');}

function validate_digest($realm, $users) {
       // Fail if no digest has been provided by the client
         unset($_SERVER['PHP_AUTH_DIGEST']);
         unset($digest);
         unset($digest_info);
         unset($request_digest);
       if (!isset($_SERVER['PHP_AUTH_DIGEST'])) {send_digest($realm);}
       // Fail if digest can't be parsed
       $username = parse_digest($_SERVER['PHP_AUTH_DIGEST'], $realm, $users);
       if ($username === false) {send_digest($realm);}
       // Valid username was specified in the digest
       return $username;

    }

I was planning on either using ajax or javascript but i don't really know how to work with either of those programming languages.

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!