Newsfeed - PHP example
Here is a step-by-step example of how to set up the ANN Newsfeed on your site using the getnews.php script. This example requires that your web host supports PHP and MySQL
- Create this table in your MySQL database:
CREATE TABLE annNews (last_query INT UNSIGNED NOT NULL, news TEXT NOT NULL );
- Insert the following record in the table you just created:
INSERT INTO annNews VALUES (0, ' ');
- In the code below, replace [mysql_user] by your MySQL username and [mysql_pass] by your MySQL password.
- In the code below, replace [database_name] by the name of your MySQL database
- In the code below, replace [u] by your newsfeed username and [p] by your newsfeed password (the getnews password, not the login password). For example, if your username is FOO and your password is BAR, the url should look like
http://animenewsnetwork.com/newsfeed/getnews.php?u=FOO&p;=BAR - Put the code below (with all 5 replacements) in a .php page on your server
- If you get a blank page, re-save your settings