Topic: Performing form query on public database

Is it possible for PHP to complete and submit a form on some website with public data and then perform some operation on the resulted data?

Re: Performing form query on public database

As long as you have a way to connect to the database (username/password), I don't see why not. You'd code it almost exactly the same way as you would with a local database.

mysql_connect("hostname or IP", "username", "password")

Re: Performing form query on public database

Well, I don't have access to that DB. It is a State Liquor Licence public database where you can check retailers for their valid liquor license.
I have created some application for a distributor where we have put all their clients info and we need to update these records with valid licences. So normally when licence is expired you have to go to that website and  query, write down valid exp. date and/or licence no.  and update a record in our database.
I just thought it would be great to have some kind of script that would submit a query on that website, then after reloading maybe load the source code and extract some portion of information we need, then store it in our database. But I guess it is just wishful thinking wink

Re: Performing form query on public database

Well... you'd probably need to check with the State Liquor license public database themselves -- see if they offer any way to query their database externally, rather than having to visit their website every time.

Without access to the database (username/password) or some API provided by the website for use, I'm not sure if you will be able to make this work.