Reply to Re: Connecting to local database from Internet

Your name:

Reply:


Posted by Sabine Dinis Blochberger on 05/17/07 08:34

mouac01@yahoo.com wrote:

> I'm not sure if this is possible. I would like to have a PHP app on
> the Internet connect and write to a local database (Intranet). For
> example, users would go to a web site http://www.internet.com to run
> the app. The app requires an internet connection and is outside of
> the user's network. The app would have the option to either store
> data locally or on the Internet. I would like to give users the
> option to store data locally because some may have privacy/security
> concerns if the data is stored on the Internet or kept/maintained by
> another company.
>
> Would the connection string below work from the Internet to connect to
> the user's local database? I don't have my web hosting service up yet
> so I can't test. Thanks...
>
> <?php
> $server='localhost' //or whatever the client db server name is
> $c=new mysqli($server,'user','passwd','db');
> ?>
>
PHP runs on the server, not the client. So if your webserver with PHP is
on the same machine (or LAN) as your database server, there should be no
problem at all.

Storing data locally through a web browser is a bit more tricky though.
If you use certificates the client trusts, it should work. Otherwise,
the website might be considered a security problem (like the ones that
stoer trojans on your PC)...
--
Sabine Dinis Blochberger

Op3racional
www.op3racional.eu

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация