Created
March 6, 2014 18:11
-
-
Save Yanovskiy/9395922 to your computer and use it in GitHub Desktop.
Curl to follow redirects
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @author dweingart at pobox dot com | |
* | |
* If you want to Curl to follow redirects | |
* and you would also like Curl to echo back | |
* any cookies that are set in the process, | |
* use this: | |
*/ | |
curl_setopt($ch, CURLOPT_COOKIEJAR, '-'); | |
// '-' means stdout |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment