I need to make a proxy script that can access a page hidden behind a login screen. I do not need the proxy to \"simulate\" logging in, instead the login page HTML should be
What you are talking about is accessing pages for which you need to authenticate yourself.
Here are a few things that must be laid down:
The key point is that you cannot gain access without authenticating yourself first.
As for language, it is pretty doable in PHP. And as the tags on the question suggest, you are using the right tools to do that job already.
One thing I would like to know is, why are you calling it a "proxy"? do you want to serve the content to other users?
EDIT: [update after comment]
In that case, use phproxy. It does what you want, along with a host of other features.