aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/poche
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas.loeuillet@gmail.com>2014-01-07 13:15:43 +0100
committerNicolas LÅ“uillet <nicolas.loeuillet@gmail.com>2014-01-07 13:15:43 +0100
commite1cf0fda27df031e478e55d6df08823d42fe2220 (patch)
tree4ab486d3f7dc77a3fab521faff8e72da8dd3de0b /inc/poche
parentf41d00ed8a1d25bee6376d7f8a309642636dd4a1 (diff)
downloadwallabag-e1cf0fda27df031e478e55d6df08823d42fe2220.tar.gz
wallabag-e1cf0fda27df031e478e55d6df08823d42fe2220.tar.zst
wallabag-e1cf0fda27df031e478e55d6df08823d42fe2220.zip
[add] user_agent in file_get_contents
Diffstat (limited to 'inc/poche')
-rw-r--r--inc/poche/Poche.class.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php
index e9ff7b46..76a73be2 100644
--- a/inc/poche/Poche.class.php
+++ b/inc/poche/Poche.class.php
@@ -333,7 +333,9 @@ class Poche
333 switch ($action) 333 switch ($action)
334 { 334 {
335 case 'add': 335 case 'add':
336 $json = file_get_contents(Tools::getPocheUrl() . '/inc/3rdparty/makefulltextfeed.php?url='.urlencode($url->getUrl()).'&max=5&links=preserve&exc=&format=json&submit=Create+Feed'); 336 $options = array('http' => array('user_agent' => 'poche'));
337 $context = stream_context_create($options);
338 $json = file_get_contents(Tools::getPocheUrl() . '/inc/3rdparty/makefulltextfeed.php?url='.urlencode($url->getUrl()).'&max=5&links=preserve&exc=&format=json&submit=Create+Feed', false, $context);
337 $content = json_decode($json, true); 339 $content = json_decode($json, true);
338 $title = $content['rss']['channel']['item']['title']; 340 $title = $content['rss']['channel']['item']['title'];
339 $body = $content['rss']['channel']['item']['description']; 341 $body = $content['rss']['channel']['item']['description'];