Fixed newsfeed with curl
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
This commit is contained in:
@@ -41,7 +41,7 @@ if ($action == "newsfeed") {
|
|||||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||||
$output = curl_exec($ch);
|
$output = curl_exec($ch);
|
||||||
curl_close($ch);
|
curl_close($ch);
|
||||||
$news = simplexml_load_file(trim($output));
|
$news = simplexml_load_string(trim($output));
|
||||||
} else {
|
} else {
|
||||||
$news = false;
|
$news = false;
|
||||||
}
|
}
|
||||||
@@ -62,4 +62,4 @@ if ($action == "newsfeed") {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
echo "No action set.";
|
echo "No action set.";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user