second commit
This commit is contained in:
parent
a59983c2c8
commit
5cbbce51ee
7
news.php
7
news.php
|
@ -1,6 +1,11 @@
|
|||
#!/usr/bin/php
|
||||
<?php
|
||||
|
||||
$READER_LINK = "reader";
|
||||
# ^^^^^^^ uri path to an instance of reader.php
|
||||
# the default is relative, and assumes you have one in the same directory as this script
|
||||
|
||||
|
||||
$feed = new XMLReader;
|
||||
$feed->open("https://news.google.com/atom?" . getenv("QUERY_STRING"), "utf-8");
|
||||
$feed->read();
|
||||
|
@ -52,7 +57,7 @@ while ($feed->read()) {
|
|||
$source_publication = $font_tag->nodeValue;
|
||||
}
|
||||
|
||||
echo "=> reader?" . $source_link . " " . $source_title . " - " . $source_publication . "\n\n";
|
||||
echo "=> " . $READER_LINK . "?" . $source_link . " " . $source_title . " - " . $source_publication . "\n\n";
|
||||
}
|
||||
} else {
|
||||
$source_publication = "";
|
||||
|
|
|
@ -4,9 +4,13 @@ Google news for Gemini
|
|||
## Requirements
|
||||
- PHP 7 (at least thats what I used)
|
||||
- A gemini server that supports CGI
|
||||
- A [reader.php](https://tildegit.org/sose/reader.php) you can use
|
||||
|
||||
## Setup
|
||||
- Put it in your cgi-bin
|
||||
- You are done
|
||||
- Set up [reader.php](https://tildegit.org/sose/reader.php) in the same cgi-bin
|
||||
- If reader.php is not in the same cgi-bin or is a remote path, you will need to change the link at the top of the script
|
||||
|
||||
I had no idea how to write php before I started this project and I didn't bother to learn, I kinda just winged it and I think that shows in the code
|
||||
|
||||
(c) oneseveneight/sose
|
||||
|
|
Loading…
Reference in New Issue