Problem using CURL exec to check affiliate URL still valid
Posted: Tue Apr 15, 2008 4:00 am
Hi there,
I'm new to the forum and looking for any ideas on a problem. I'm currently trying to check URLs on an affiliate website are still valid and going to the correct destination. I'm running these urls through the curl_exec with CURLOPT_FOLLOWLOCATION set to true and CURLOPT_MAXREDIRS set to 10. These urls have a number of redirects but I'm only getting back the first redirect with an http_code of 302. Anyone know why CURLOPT_MAXREDIRS doesn't seem to be working? Here is the output from the exec.
url = http://www.tkqlhce.com/click-1396623-10466125
content_type = text/plain
http_code = 302
header_size = 545
request_size = 76
filetime = -1
ssl_verify_result = 0
redirect_count = 0
total_time = 0.471253
namelookup_time = 0.156581
connect_time = 0.312772
pretransfer_time = 0.312791
size_upload = 0
size_download = 180
speed_download = 381
speed_upload = 0
download_content_length = 180
upload_content_length = 0
starttransfer_time = 0.471205
redirect_time = 0
ok = 1
errno = 0
errmsg =
content = The URL has moved here http://www.apmebf.com/d7108xdml3/dkp/21 ... %3cM%3c%3c
This url then redirects you to http://www.summerliving.24studio.co.uk/ ... ource=TX0W
I'm using php version 4.4.8. by the way.
Thanks in advance,
Jon.
I'm new to the forum and looking for any ideas on a problem. I'm currently trying to check URLs on an affiliate website are still valid and going to the correct destination. I'm running these urls through the curl_exec with CURLOPT_FOLLOWLOCATION set to true and CURLOPT_MAXREDIRS set to 10. These urls have a number of redirects but I'm only getting back the first redirect with an http_code of 302. Anyone know why CURLOPT_MAXREDIRS doesn't seem to be working? Here is the output from the exec.
url = http://www.tkqlhce.com/click-1396623-10466125
content_type = text/plain
http_code = 302
header_size = 545
request_size = 76
filetime = -1
ssl_verify_result = 0
redirect_count = 0
total_time = 0.471253
namelookup_time = 0.156581
connect_time = 0.312772
pretransfer_time = 0.312791
size_upload = 0
size_download = 180
speed_download = 381
speed_upload = 0
download_content_length = 180
upload_content_length = 0
starttransfer_time = 0.471205
redirect_time = 0
ok = 1
errno = 0
errmsg =
content = The URL has moved here http://www.apmebf.com/d7108xdml3/dkp/21 ... %3cM%3c%3c
This url then redirects you to http://www.summerliving.24studio.co.uk/ ... ource=TX0W
I'm using php version 4.4.8. by the way.
Thanks in advance,
Jon.