quizwedge
asked on
CURLOPT_HEADER returns 401
I need to get the location header. From what I've read, this should be as simple as
If I don't include those two options, the curl request works fine, but I'm not able to get the location header.
If I do include those two options, then I get a 401 error.
The Location that is being returned should be a URL that does require an additional login. What am I doing wrong?
curl_setopt($c, CURLOPT_HEADER, true);
curl_setopt($c, CURLOPT_FOLLOWLOCATION, false);
If I don't include those two options, the curl request works fine, but I'm not able to get the location header.
If I do include those two options, then I get a 401 error.
The Location that is being returned should be a URL that does require an additional login. What am I doing wrong?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If our questions prompted you in a direction that led to the correct answer, I would consider awarding points to those comments.
ASKER
It wasn't any one question that prompted me, but I'll split points.
ASKER
The issue was a previous request. I didn't have enough information in the question to allow others to provide an answer and once I got that information, I was able to find the solution.
ASKER
Accepted answer: 0 points for quizwedge's comment #a40346289
for the following reason:
The issue was a previous request. I didn't have enough information in the question to allow others to provide an answer and once I got that information, I was able to find the solution.