*Editted to reflect changes in App Details page :: Application Domain changed to Security Key*
First, to use the library -- in fact, to make use of the RESTful API at all -- you'll have to create a MySpace App through which your server can access MySpace data.
Once you've created an App, the App details screen will give you two pieces of information: Application URI (a URL which points to your App) and a Security Key (a long string of letters and/or numbers). These are your Consumer Key and Consumer Secret, respectively. You'll have to set the variables '$key' and '$secret' in your PHP code to these values.
The last thing you'll need to do is install the App on the profile you want to get information about: for example, your own. In other words, the UserID you use must be one that has the App installed on it's profile. This is how a User grants permission to your App (and through it, your server) to access their personal information. Without this you'll recieve the "401: Application does not have required permissions to make this call." error.
Now, as far as asking a person for their username and password -- you can't. Well, you can, and you might even get away with posting them to MySpace to log them in, but that won't help you get their UserID, and most people aren't going to comfortably hand over their password to a third-party site anyway. There's also no way to poll MySpace for UserIds (except those of friends of a UserId you already have, but that doesn't help you either) using this or any RESTful API library. Privacy is a of paramount concern to MySpace and it's users, as much as that might hinder developers.
To collect that information, you'll have to find another way. There's a few suggestions in some other forums, or you could ask for more. I suggest you don't do it here, though, as this thread is specifically about the PHP Client Library.