Click to See Complete Forum and Search --> : Accessing a Database on another Server


luvv2rock
12-05-2006, 12:03 PM
I work for a car dealership and our used car inventory is stored on another server (http://www.autobase.com/ar/lewissuperstore/) I am wanting to pull the information from here to our website without the use of iframes (which is what we are doing now). anything that would point me into the right direction is much appreciated. Thank you
Zachary

coppocks
12-05-2006, 12:39 PM
Short Answer: I don't think so... at least not directly.

Long Answer: There are round-about ways to accomplish that depending on YOUR server configuration. For example, I could use PHP to grab the contents of "http://www.autobase.com/cgi/list.exe?dealer=lewisss&category=comp" and then display the results of Pre-Owned Compact Cars directly on your web page, that is, provided you had PHP available on your own servers. You could insert/position those results within any HTML display code you wanted. But if you wanted to change the way the return of the previously mentioned link looks, while possible, after looking at the source code, it's probably not worth the trouble.

There may be other ways, but that's the only way that comes to mind for me at the moment. If you have PHP on your server, and want to pursue that avenue, I'll be glad to show you how. BUT, since the database returns additional links to be clicked on, you wouldn't be able to format those results. They would take you back to "http://www.autobase.com/cgi/info.exe?bc=2842365&dealer=lewisss" for example, if someone clicked on the 2 Dr Coupe.

Although, if you have PHP on your server, you probably have a database available such as MySQL that would allow you to house your own data... but that's another ballgame.

luvv2rock
12-05-2006, 01:15 PM
I do have PHP on my server, and may be intersted in doing this. However I use asp.net (vbasic) for everything else that i've done i won't step on my toes will i?

coppocks
12-05-2006, 02:03 PM
Well... PHP and ASP have some similarities. And even though I have Windows 2003 Servers... I personally have never coded ASP pages beyond "Hello World". That's because (ahem!) I started way back when Linux/Apache servers was all there was, and have used PHP and MySQL ever since because they became portable on Windows and Linux, whereas ASP and MSSQL (Microsoft SQL) are not.

I am going to step out on a limb and say that you can probably do with ASP most anything you can do with PHP and vice-versa. I can not help you with ASP. And while I have written small Desktop apps with VB.NET, I've never coded any server-side apps with it.

If you have PHP and MySQL on your server, you can port your data to that, as well as PHP/MSSQL (though with more complexity), or ASP/MS ACCESS or ASP/MSSQL.

I've never used ASP in conjunction with PHP, so I dunno if you'd be stepping on yer toes or not.

Either way, you'd be creating an entirely new database, and writing new code to display the data the same way the other guys are doing it for you. That's no small feat from scratch regardless of whether you use ASP or PHP. But you would have total control over what, when and how your data is displayed.

luvv2rock
12-05-2006, 05:45 PM
ok, well i'm not familiar with databases at all really, I know how to get my applications to call from them, but i don't know how to make them. How would I go about porting to my mysql and i can creat a string to that. (btw, thank you for your help)

coppocks
12-05-2006, 07:25 PM
Well, assuming you have MySQL and PHP on your Server...

First thing I would do since if this is your first foray into PHP/MySQL, is find out if you have phpMyAdmin installed. If not, get it (it's free), and install it (or have your server administrator install it for you) ... "phpmyadmin.net". That is an administrative interface to MySQL using PHP. It not only allows you to create the databases, it also shows you most of the query strings used when you do certain functions such as add data, delete data, create tables etc. It can be a great learning tool in creating databases and learning how to create the SQL query strings used in PHP.

You might even consider having PHP, MySQL, Apache, and phpMyAdmin installed on a desktop computer so you can learn and test there. There are packages out there that install all or most of those items in one swift move, though I've never used one as I have always installed them separately.

What format do you use to place data on "autobase.com"? That is, CSV (comma separated values, generally exported from apps like MS Excel), MS Access dbase, TSV (tab separated values) etc. phpMyAdmin has an import feature allows you to import data from most text files, which is what a CSV or TSV file is.

This all may seem a bit overwhelming at first. But we all started somewhere!

chazzy
12-05-2006, 07:48 PM
What in the world does this topic have to do w/ client side accessibility? O_O

Anyways, have you considered contacting autobase to ask if you can have read access (or maybe read/write) to their database, in order to download data from it? It makes more sense for your database to talk to their database, rather than your client side somehow deal w/ their client side, since client sides are typically for end user display.

they might be able to provide you access to a web service or even a direct database connection.