Good God, this really should not have been so difficult to resolve. But finally I have, so here's the answer for the benefit of future fellow hair-puller-outters:
If the URL format mentioned above doesn't work for you, try making a form and posting the required information to the URL instead.
I could swear that I tried this at one point and it didn't work, but it does work now, so no complaints.
There's a rather thorough example in PHP here: SampleBrandedLogin < AllDocumentation < TWiki
The following, however, is my somewhat simplified version, which will work for logging into cPanel (2082) only:
Code:
<?php
$href = 'example.com:2082/login/';
echo "<form action=\"$href\" method=\"POST\"";
echo "<input type=\"hidden\" name=\"user\" value=\"$user\"";
echo "<input type=\"hidden\" name=\"pass\" value=\"$pass\"";
echo "<input type=\"hidden\" name=\"failurl\" value=\"$href\"";
echo "<input type=\"hidden\" name=\"login_theme\" value=\"default\"";
echo "<input type=\"submit\" value=\"Login\"";
?>
Since I already know the user's username & password, no need to ask them for it, I just pass it in variables.
Hope this helps someone.