Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

peacetrain67

macrumors member
Original poster
Dec 20, 2007
68
0
I'm looking for a good guide to logging in to a web site's database? For instance, if www.macrumors.com (not using macrumors, just an example) has a log in set up, and in my application I would like to have user's log in with existing accounts from that site (and then later access some info from that site), how would I tackle this. I have the log in objects, fields, etc. set up easily, but just don't know how to interact with a web site's database. I REALLY would love anyone who can help me/point me in the right direction with a tutorial or something. Thanks
 
Unless the site has an API for direct access to the database then you can't interact with it directly. So for MacRumors for example you can't. You're only option is to mimic a web browser and send requests that are identical to the web pages and parse the results.
 
Unless the site has an API for direct access to the database then you can't interact with it directly. So for MacRumors for example you can't. You're only option is to mimic a web browser and send requests that are identical to the web pages and parse the results.

If I am working with the site owner (not macrumors), how do we go about allowing interaction with the database (using logging in as an example seems most sensible to me).
 
If I am working with the site owner (not macrumors), how do we go about allowing interaction with the database (using logging in as an example seems most sensible to me).

Then it depends entirely on what the database is. You'll probably need to either agree some API and write some server-side code that gives you access or spend time either writing your own or integrating a third party library to allow you to access the database over the network using it's native access API. Either way your question is ridiculously open-ended. If you have specific questions once you have code then that's fine: this is an unrealistic thing to ask. I might as well ask "how do I write a 3D shooter from scratch".
 
Then it depends entirely on what the database is. You'll probably need to either agree some API and write some server-side code that gives you access or spend time either writing your own or integrating a third party library to allow you to access the database over the network using it's native access API. Either way your question is ridiculously open-ended. If you have specific questions once you have code then that's fine: this is an unrealistic thing to ask. I might as well ask "how do I write a 3D shooter from scratch".

well, that is why i was looking for a "point in a direction." i have gone thru some sqlite and xml-parsing tutorials, but, specifically what i am looking for is how to correspond with a database's files (in a specific directory) to get a true/false response (if the login is correct or not). i know this is a little vague, but i feel like the jist of the goal is described.shouldn't i just be able to send out a query to the database submitting the info, and get a response?
 
Do you have 2 logins or something? I'm confused now.

Anyway as I said it depends 100% on what the database is. A website normally wouldn't run on a "file" database. It'd run on something like MySQL or better. Each database of this type provides an API for logging in remotely and querying the database. If the site is running off a set of flat files then you will have to write a server-side component that can understand the files and provide an API for your.

So my pointer is: find out exactly what you are working with and come back with some concrete answers instead of talking in generic terms.
 
Do you have 2 logins or something? I'm confused now.

Anyway as I said it depends 100% on what the database is. A website normally wouldn't run on a "file" database. It'd run on something like MySQL or better. Each database of this type provides an API for logging in remotely and querying the database. If the site is running off a set of flat files then you will have to write a server-side component that can understand the files and provide an API for your.

So my pointer is: find out exactly what you are working with and come back with some concrete answers instead of talking in generic terms.

alright, ill get that info on monday and come back here. thanks for the help

*and yeah, one is on my desktop and i dont remember the password, it is just saved. this one is on my mbp.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.