Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

ExpandURLs plugin: Add cURL user agent to get Facebook redirects, clo…

…ses #1282
  • Loading branch information...
commit f909861070726df792bdbd5ddf735ea1185c7ea5 1 parent 07ecf63
@ginatrapani ginatrapani authored
Showing with 1 addition and 0 deletions.
  1. +1 −0  webapp/plugins/expandurls/model/class.URLExpander.php
View
1  webapp/plugins/expandurls/model/class.URLExpander.php
@@ -70,6 +70,7 @@ public static function expandURL($tinyurl, $original_link, $current_number, $tot
curl_setopt($ch, CURLOPT_HEADER, true);
curl_setopt($ch, CURLOPT_NOBODY, true);
curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
+ curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0");
$response = curl_exec($ch);
if ($response === false) {
$error_msg = $reconstructed_url." cURL error: ".curl_error($ch);
Please sign in to comment.
Something went wrong with that request. Please try again.