I have a cURL script, which logs in to a site with hardcoded login details. This is OK, and it’s working.
Also I want to redirect the client to the logged in page, logged in. The target page is not on my server and I don’t have access to the code.
How can I do that?
From your description, you can’t do that. The client will need to know the hardcoded login details, or the target page will need some form of special auth(entication/orisation) setup.
The -v command line switch among other things turns on display of headers that you send and what server responds. For instance, if I type:
curl -v http://www.sitepoint.com
I get this: