php - Strange redirecting problem when attempting to login using curl
Get the solution ↓↓↓Solution:
I admit it's not an obvious one.
But finally I made it working. I skipped the URL encoding of ampersand signs in the URL argument. So my line was:
curl_setopt($ch, CURLOPT_URL,"http://www.indianvideogamer.com/forums/index.php?app=core&module=global§ion=login&do=process") ;
BTW, are you sure it's the whole script? My PHP complains about lack of definition ofCURL_TIMEOUT
andWEBBOT_NAME
, but that doesn't seem to affect the login.
Answer
Solution:
Try using
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
This will follow redirects.
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: dompdf image not found or type unknown
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.