summaryrefslogtreecommitdiff
path: root/modules/backend.class
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2001-02-27 07:45:03 +0000
committerDries Buytaert <dries@buytaert.net>2001-02-27 07:45:03 +0000
commit4d31d27ff0d9270f03456d17f5387f60bc99c22d (patch)
tree351bcea4888fa43f6d754c038d6540579f2b993b /modules/backend.class
parent3364e843175848dc265d463eddcabcd9e2f620b2 (diff)
downloadbrdo-4d31d27ff0d9270f03456d17f5387f60bc99c22d.tar.gz
brdo-4d31d27ff0d9270f03456d17f5387f60bc99c22d.tar.bz2
- added comment index for performance sake
- improved comment module - code revision - improved backend module - moreover headlines now work - (automatically) stripped tabs and trailing whitespaces from Jeroen's theme.
Diffstat (limited to 'modules/backend.class')
-rw-r--r--modules/backend.class11
1 files changed, 2 insertions, 9 deletions
diff --git a/modules/backend.class b/modules/backend.class
index 7cdaa328b..6339afd53 100644
--- a/modules/backend.class
+++ b/modules/backend.class
@@ -51,24 +51,17 @@ class backend {
if ($this->file) {
// Decode URL:
$url = parse_url($this->file);
- $host = $url[host];
- $port = $url[port] ? $url[port] : 80;
- $path = $url[path];
-
- // print "<PRE><B>Debug:</B> $url - $host - $port - $path</PRE>";
// Retrieve data from website:
- $fp = fsockopen($host, $port, &$errno, &$errstr, $timout);
+ $fp = fsockopen($url[host], ($url[port] ? $url[port] : 80), &$errno, &$errstr, $timout);
if ($fp) {
// Request data via URL:
- fputs($fp, "GET $path HTTP/1.0\nUser-Agent: $site_name\nHost: $host\nAccept: */*\n\n");
+ fputs($fp, "GET $url[path]?$url[query] HTTP/1.0\nUser-Agent: $site_name\nHost: $url[host]\nAccept: */*\n\n");
// Read data from socket:
while(!feof($fp)) $data .= fgets($fp, 128);
- // print "<PRE>$data</PRE><HR>";
-
if (strstr($data, "200 OK")) {
// Remove existing entries: