Skip to content

Commit 0fb393d

Browse files
committed
Minor tweaks
1 parent e282d1d commit 0fb393d

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

data/feed.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
header("Content-type: text/html; charset=utf-8");
3-
$url ="https://feedbin.com/starred/THSYv5sdrKKOP92eQluQAQ.xml"; // Link to your own XML feed
3+
$url ="https://feedbin.com/starred/<your-xlm-feed>.xml"; // Link to your own XML feed
44

55
$ch = curl_init();
66
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
@@ -14,7 +14,7 @@
1414
// print_r($xml);
1515

1616
## Write items from XML to database
17-
$db = mysql_connect("localhost", "username", "password");
17+
$db = mysql_connect("hostname", "username", "password");
1818
mysql_select_db("Feedbin", $db) or die(mysql_error()); // Establish database connection
1919

2020
foreach($xml->channel->item as $row) {

data/import.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
$published = $row['published'];
1313
$date = strtotime($published); // Convert to Unix timestamp
1414

15-
##Insert into mysql table
15+
##Insert into MySQL table
1616
$sql = "INSERT INTO `starred` ( `date`, `title`, `url`) VALUES('$date', '$title', '$url')";
1717
mysqli_query($db,$sql);
1818
}

include/db_connect.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
$db = new mysqli("localhost", "root", "password", "Feedbin"); // Change according to your own settings
2+
$db = new mysqli("hostname", "username", "password", "Feedbin"); // Change according to your own settings
33
$db->set_charset("utf8");
44
if ($db->connect_errno) {
55
echo "Failed to connect to MySQL: (" . $db->connect_errno . ") " . $db->connect_error; }

include/db_create.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
header("Content-type: text/html; charset=utf-8");
33

44
## Establish database connection
5-
$db = new mysqli("localhost", "username", "password"); // Change according to your own settings
5+
$db = new mysqli("hostname", "username", "password"); // Change according to your own settings
66
$db->set_charset("utf8");
77
if ($db->connect_errno) {
88
echo "Failed to connect to MySQL: (" . $db->connect_errno . ") " . $db->connect_error; }

0 commit comments

Comments
 (0)