Forum Moderators: coopster & phranque

Message Too Old, No Replies

         

RussellC

7:58 pm on Feb 6, 2003 (gmt 0)

10+ Year Member



I made an intranet based database that tracks clients. On our website people can request quotes or fill out paperwork etc... Would it be possible to get the info that people fill out on the website to go into the server on our intranet? The website is hosted off site and the intranet is hosted here, but it does not have a public IP address. I can't see how to do this but is it possible to get this to work when the DB is stored locally?

Thanks.

jatar_k

8:01 pm on Feb 6, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



at very least you could store it in a db on the server and then dump and import onto the intranet server.

I would think that the intranet would be fairly well concealed from the outside world. Maybe someone else can come up with something.

the_Eych

8:41 pm on Feb 6, 2003 (gmt 0)

10+ Year Member



A script in the intranet can be running continiously and it can be contacting a script running on the public server. Then, the script from the public server will transfer all the data that is required to the intranet script and it will store the data in the intranet database.

This should work, i think.

RussellC

8:47 pm on Feb 6, 2003 (gmt 0)

10+ Year Member



Sounds like that might work, I didn't think about the Intranet server contacting the external site. I don't how it would be accomplished, but I will look into it. Thanks for the suggestion.

andreasfriedrich

9:00 pm on Feb 6, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yep, just write a script on the server that will create a socket (socket_create(), Socket [perldoc.com]), bind it to a certain port (socket_bind(), bind [perldoc.com]) and then have it listen (socket_listen(), listen [perldoc.com]) on that port for incoming connections. When there is a connection accept it (socket_accept(), accept [perldoc.com]) and print the data to the socket (socket_send(), print [perldoc.com], send [perldoc.com]). In Perl the IO::Socket [perldoc.com] class makes this very easy.

(socket_create() [php.net], socket_bind() [php.net], socket_listen() [php.net], socket_s[url=http://www.php.net/end]end() [php.net][/url] no idea why the above didnīt get transalted into links)

Andreas

RussellC

9:11 pm on Feb 6, 2003 (gmt 0)

10+ Year Member



Thanks a bunch. I don't know perl but I think I can figure it out. There isn't anything like this in php is there?

Thanks.

RussellC

9:15 pm on Feb 6, 2003 (gmt 0)

10+ Year Member



Just saw your edit

amoore

9:17 pm on Feb 6, 2003 (gmt 0)

10+ Year Member



if the database on the webserver listens for remote connections, then you can connect directly to it from the machine on your internet. You won't have to write your own daemon or anything. I would be very surprised if PHP didn't allow you to connect to remote databases.

you could write something to pull all the data you need down regularly, say nightly. Or, you could write your application on the internal machine to connect directly to the remote database as it needs the data.