metalwar Posted July 30, 2007 Share Posted July 30, 2007 Hello, I am designing a web site for a housing company. They have a database (I believe it's MS SQL) that contains information regarding vacancies of their units which I would like to pull and display on the site. So my question is: is it possible to have the web site hosted by arbitrary company x, on their server, and connect to our server's database through php? Every example I have seen, it looks to me like the php scripts are being run on the same server as the database (or maybe I'm just missing something). If it is possible, could somebody point me in the direction of some sources and/or some sample code. Any help would be much appreciated. Thanks Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted July 30, 2007 Share Posted July 30, 2007 Yes PHP can connect to remove database servers. Just make sure the remote server allows connections from the internet. When you want to connect to the remote ms sql database you'll provide the ip address or the url to the remote mssql server, eg: $cnx = mssql_conncect('ip/url to database here', 'username', 'password); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.