HF RL Explorer

Task: Implement PHP cURL Function to Track HTTP Redirects

Task: Implement PHP cURL Function to Track HTTP Redirects: a task in Terminal-Lego-15k (Harbor dataset). You need to create a PHP function that uses cURL to follow HTTP redirects and return the final destination URL. The key issue is that when using cURL with CURLOPT FOLLOWLOCATION , you must…

The task

You need to create a PHP function that uses cURL to follow HTTP redirects and return the final destination URL. The key issue is that when using cURL with `CURLOPT_FOLLOWLOCATION`, you must actually execute the request with `curl_exec()` before calling `curl_getinfo()` to get the effective URL after redirects.

Part of PrimeIntellect/Terminal-Lego-15k.