How to Retrieve a value From Website With Password Protected Login : ##Problem
I want to be able to retrieve a value from a website protected by a password.
In particular, I want to retrieve the number of problems I have solved from Project Euler - which requires a confirmation code to login. 

Now, I know how to retrieve a value from a particular web page.

However, I am not sure how to retrieve a web page that requires a login with a confirmation system.

##My Code
Disclaimer: code taken and adapted from: http://stackoverflow.com/questions/4573498/get-value-from-external-webpage-php-or-java

I have the following code to retrieve the next value I want from a web page:

    <?php
       
    // Read the whole file.
    $lines = file('https://projecteuler.net/progress');

    // Go through every line ..
    while ($line = array_shift($lines)) {

        // Stop when you find the label we're looking for.
        //NOTE: The word 'Solved' only exists on the web page when you are logged into an account.
        if (strpos($line, 'Solved') !== false) break;

    }

    // The next line has your value on it.
    $line = array_shift($lines);

    // Print the first word on the line.
    $values = explode(' ', $line);
    echo $values[0];

    ?>

##What this Code Actually Does
This code will go to the web page https://projecteuler.net/progress as it states. However, since this web page can be accessed without logging into the account, it will retrieve the values from that web page, instead of the web page that is accessed from logging in.

Essentially, there are **two** /progress pages - one for when you login, and one for when you are not logged in.

I want to be able to access the /progress page for when you are logged into your account. I have tried:

##Things I've tried
I tried to use the information at this link:
http://stackoverflow.com/questions/5420506/reading-information-from-a-password-protected-site

With no success.

Also, since Project Euler requires you to enter a 'Confirmation Code' before logging in, I am not sure how this will work.

How might I do this?