...
|
...
|
@@ -12,16 +12,16 @@ if ($xml === false) {
|
12
|
12
|
$channel['description'] = $xml->channel->description;
|
13
|
13
|
$channel['pubDate'] = $xml->channel->pubDate;
|
14
|
14
|
$channel['timestamp'] = strtotime($xml->channel->pubDate);
|
15
|
|
- //echo '<h4>' . $channel['title'] . '</h4>';
|
16
|
|
- echo '<h4>' . $channel['title'].'<button id="html-btn" onclick="printHTMLAll(\''.$channel['title'].'\')" style="display:inline;"><img src="img/html5.png" width="24px" height="24px"></button></h4>'.PHP_EOL;
|
|
15
|
+ echo '<h4>' . $channel['title'].'<button id="html-btn" onclick="printHTMLAll(\''.urlencode($channel['title']).'\')" style="display:inline;"><img src="img/html5.png" width="24px" height="24px"></button></h4>'.PHP_EOL;
|
17
|
16
|
$cpt=0;
|
18
|
17
|
foreach ($xml->channel->item as $item) {
|
19
|
18
|
$article = array();
|
20
|
19
|
$article['title'] = $item->title;
|
21
|
20
|
$article['link'] = $item->link;
|
22
|
|
- $orgStrings = array('?xtor=RSS-13');
|
23
|
|
- $newStrings = array('');
|
24
|
|
- $article['link'] = str_replace($orgStrings, $newStrings, $article['link']);
|
|
21
|
+ //$orgStrings = array('?xtor=RSS-13');
|
|
22
|
+ //$newStrings = array('');
|
|
23
|
+ //$article['link'] = str_replace($orgStrings, $newStrings, $article['link']);
|
|
24
|
+ $article['link'] = re_remove($article['link'], '/\?xtor=RSS-(.+)/');
|
25
|
25
|
$article['pubDate'] = $item->pubDate;
|
26
|
26
|
$article['timestamp'] = strtotime($item->pubDate);
|
27
|
27
|
$article['description'] = $item->description;
|