oscarotero/Embed — pull request #6 by mstadius (2013-11-18 11:10:15+00:00)
Title: Added handlig for redirects when open_basedir is set or safe_mode is on.

Handle:

PHP Warning: curl_setopt_array(): CURLOPT_FOLLOWLOCATION cannot be activated when safe_mode is enabled or an open_basedir is set in ...

Added curl_exec_follow function and changed
//	$content = curl_exec($connection);
$content = $this->curl_exec_follow($connection);
in resolve function to handle redirects when open_basedir is set or safe_mode is on.

curl_exec_follow copied from

http://stackoverflow.com/questions/10835255/curlopt-followlocation-cannot-be-activated-when-safe-mode-is-enabled-or-an-open/10835824#10835824

and modified to handle relative redirects and added scheme restriction.