As you have probably seen we have an RSS feeds section. The website reads files provided by other website for content, generates threads on them. However the data is gets is just a single one liner, wouldn't it be nice to have a paragraph and image, just to entice you more into the article, there will be a link to the original article too.
So how do we go about doing this, well I have had it running on the website some time ago, but it was hard to modify. Basically it will follow the link, read the website and grab snippets of info. Stored in a database, it generate an RSS file that the forum then reads in to create a thread. So basically a bit of software i write sites in the middle fetching and filtering info for our website.
My new version of this will have an online admin section so I can add/remove sources easier, and adapt what it searched for on the pages. I have written loads of things in classic ASP, and I tend to use MSAccess databases with an ODBC connection via a DSN. This works fine on a windows server which I have. but eventually want to move certainly resources to the Linux website, the one this forum is on. So before I start the database, should I go the MySQL route? or MSAccess (this is how the database is stored for the forum), basically there are two main sources for databases, MSAccess or MySQL. the MySQL is probably the better one of the two.
I want to be able to develop it on my PC, and then test on the web server. I don't want to test/develop on the webserver, want to keep it all local to begin with before going online.
As this website is on a Linux server, and ASP is Microsoft, we can run ASP on the Linux server as there is an option for this, so I will need to run further testing on this. I have downloaded and installed MySQL server on windows so I can use that for testing.
Can Classic ASP connect to MySQL, well yes, ASP connection to MySQL
Although I have spent many hours last night, and tried various ways of doing it, but never got it working. I will keep trying. As MySQL would be nice if it's working, if all else fails I will need to do it on the Windows Server as I usually do.
Something like the above should do it, although the MySQL driver isn't playing ball. Although tried it thouh a Dreamweaver connection, and although the various MySQL connections were listed, none of them actually talked to the database. Perhaps it's an issue with the way MySQL is on my testing PC.
Anyway, this is what I am currently working on.
So how do we go about doing this, well I have had it running on the website some time ago, but it was hard to modify. Basically it will follow the link, read the website and grab snippets of info. Stored in a database, it generate an RSS file that the forum then reads in to create a thread. So basically a bit of software i write sites in the middle fetching and filtering info for our website.
My new version of this will have an online admin section so I can add/remove sources easier, and adapt what it searched for on the pages. I have written loads of things in classic ASP, and I tend to use MSAccess databases with an ODBC connection via a DSN. This works fine on a windows server which I have. but eventually want to move certainly resources to the Linux website, the one this forum is on. So before I start the database, should I go the MySQL route? or MSAccess (this is how the database is stored for the forum), basically there are two main sources for databases, MSAccess or MySQL. the MySQL is probably the better one of the two.
I want to be able to develop it on my PC, and then test on the web server. I don't want to test/develop on the webserver, want to keep it all local to begin with before going online.
As this website is on a Linux server, and ASP is Microsoft, we can run ASP on the Linux server as there is an option for this, so I will need to run further testing on this. I have downloaded and installed MySQL server on windows so I can use that for testing.
Can Classic ASP connect to MySQL, well yes, ASP connection to MySQL
Although I have spent many hours last night, and tried various ways of doing it, but never got it working. I will keep trying. As MySQL would be nice if it's working, if all else fails I will need to do it on the Windows Server as I usually do.
<%
Dim oConn, oRs
Dim qry, connectstr
Dim db_name, db_username, db_userpassword
Dim db_server
db_server = "mysql.secureserver.net"
db_name = "your_dbusername"
db_username = "your_dbusername"
db_userpassword = "your_dbpassword"
fieldname = "your_field"
tablename = "your_table"
connectstr = "Driver={MySQL ODBC 3.51 Driver};SERVER=" & db_server & ";DATABASE=" & db_name & ";UID=" & db_username & ";PWD=" & db_userpassword
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open connectstr
qry = "SELECT * FROM " & tablename
Set oRS = oConn.Execute(qry)
if not oRS.EOF then
while not oRS.EOF
response.write ucase(fieldname) & ": " & oRs.Fields(fieldname) & "
"
oRS.movenext
wend
oRS.close
end if
Set oRs = nothing
Set oConn = nothing
%>
Something like the above should do it, although the MySQL driver isn't playing ball. Although tried it thouh a Dreamweaver connection, and although the various MySQL connections were listed, none of them actually talked to the database. Perhaps it's an issue with the way MySQL is on my testing PC.
Anyway, this is what I am currently working on.