forked from mozfr/www
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpostload.php
executable file
·37 lines (31 loc) · 911 Bytes
/
postload.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
/**
* Load one particular feed
*/
error_reporting(0);
include_once(dirname(__FILE__).'/app/classes/Planet.class.php');
function unhtmlspecialchars( $string ) {
$string = str_replace ( '&', '&', $string );
$string = str_replace ( ''', '\'', $string );
$string = str_replace ( '"', '\"', $string );
$string = str_replace ( '<', '<', $string );
$string = str_replace ( '>', '>', $string );
return $string;
}
//Build config object
//Use OPML title if no title defined in the config file
$PlanetConfig = new PlanetConfig(array());
//Instantiate app
$Planet = new Planet($PlanetConfig);
$Planet->addPerson(
new PlanetPerson(
'',
unhtmlspecialchars($_GET['url']),
''
)
);
//Load feeds
$Planet->download(1);
header("Content-type: image/png");
readfile(dirname(__FILE__)."/custom/img/feed.png");
die();