From c1c354ddabcb5224854ba5692af99d1d8bc88b52 Mon Sep 17 00:00:00 2001 From: Jon Gorman Date: Thu, 16 Nov 2017 09:54:44 -0600 Subject: [PATCH] facet_viewer will follow redirects, to help with issues where all http are redirected to https --- facet_viewer/index.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/facet_viewer/index.php b/facet_viewer/index.php index 9fbf74c..9fa91fa 100644 --- a/facet_viewer/index.php +++ b/facet_viewer/index.php @@ -37,6 +37,9 @@ function getSets($rt) { //return the transfer as a string curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + //tweak to follow redirects + curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true ); + // $output contains the output string $output = curl_exec($ch); @@ -168,6 +171,8 @@ function transformToTable($feedURL, $field) { //return the transfer as a string curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($ch,CURLOPT_FOLLOWLOCATION, true ) ; + // $output contains the output string $pageoutput = curl_exec($ch); @@ -268,4 +273,4 @@ function transformToTable($feedURL, $field) { }); - \ No newline at end of file +