Skip to content

Commit

Permalink
Hanlde 301 response to follow redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
Felix Nyffenegger authored and Felix Nyffenegger committed Jan 1, 2016
1 parent ee64ce0 commit 777452e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion public/getpages.php
Expand Up @@ -77,7 +77,7 @@
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
curl_setopt($ch, CURLOPT_USERAGENT, $useragent);

curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$contents = curl_exec($ch);
curl_close($ch);

Expand All @@ -87,6 +87,8 @@
$contents = removeComments($contents);
$contents = removeClassInfo($contents);

//echo "Content:" . $contents;

//-------------------------------------------------------------------------------------------
// Parse the Topicfile to find WikiLinks
//-------------------------------------------------------------------------------------------
Expand Down

0 comments on commit 777452e

Please sign in to comment.