View Single Post

   
  #2 (permalink)  
Old 02-28-2008, 07:13 AM
Bill Karwin
 
Posts: n/a
Default Re: Updating record remotely from a script?

"Burma Jones" <somebody@somedomain.not> wrote in message
news:MKidndgERPXhYzzeRVn-tA@comcast.com...
> I have a MySQL database on my ISP's Linux server. Can anyone tell me if
> it would be
> possible to update a specific record remotely without any user
> interaction? In other words,
> from a Windows script or batch file do the update without any interaction
> from myself.
> I was thinking of passing the update variables in a URL to a PHP script on
> the server,
> but that would open a browser window on the client which I don't want to
> do.
> Perhaps some other protocol or ODBC or something? Thanks!


Maybe. Depends on your ISP's firewall configuration.

Connecting from a client machine to the MySQL server requires the network
port 3306 be open on the ISP's server and firewall, to permit the
connection. (3306 is the default server port for MySQL, but it can be
configured to a different port.) As far as I know, this is the case
regardless of whether one uses a mysql command-line client, or the MyODBC
driver, or other clients.

Often ISP's are reluctant to enable ports such as this one, even if it's a
relatively well-known service. It's one more protocol and service that they
now have to be experts in, to watch for security risks. Their users might
inadvertently create security holes.

There are tools to allow you to automate the task of making an HTTP request,
that don't require the client machine open a GUI browser. "wget" and "lynx"
are examples.
http://www.gnu.org/software/wget/wget.html
http://lynx.isc.org/
Note: these are both licensed under the GPL, so they cannot be distributed
with non-GPL products.

Here's an article about a command-line Windows HTTP client from Microsoft,
included in the Windows 2000 resource kit:
http://www.windowsitpro.com/Web/Arti...048/16048.html

There's also a Windows C/C++ API for accessing HTTP resources
programmatically:
http://msdn.microsoft.com/library/de...ml/winhttp.asp

Regards,
Bill K.


Reply With Quote