I did the same thing, only for a different reason. I had forums run by CGI and I needed to have dynamic content which was updated by other sites to show their newest articles. I just wrote a PHP script to allow the different users to login, then each wrote to a different *.txt file.
I then exploded out different info and made a PHP script which got the data from different files depending upon what control I gave it. Worked like a charm. I could then include the new articles from other sites anywhere in my website, PHP or non
.
Here is what I would do. If you are using a database, which I imagine you are, and I pray that the webmaster's you are dealing with are capable of manipulating data, then follow my madness, for there is method in't.
Say you have a table called stories, with the following columns:
Code:
id
author
date
title
content
Then use refferer to allow access to the following file:
PHP Code:
// URL looks like this:
// [url]http://www.yourdomain.com/articles.php?old_date=5[/url]
$sql = "SELECT * FROM stories WHERE date + 0 > CURDATE() + 0";
$result = mysql_query($sql);
$i = 0;
$e = mysql_num_rows($result);
while($row = mysql_fetch_array($result)){
extract($row);
$content = ereg_replace("|", "[line]", $content);
if($i < $e){
echo("$id|$date|$author|$title|$content[new_data]");
} else {
echo("$id|$date|$author|$title|$content");
}
}
See how that would work?
Bookmarks