Forum Moderators: phranque

Message Too Old, No Replies

Showing MySQL results on external websites?

Don't know if this is the right forum..?

         

jacknoir

8:41 am on Apr 19, 2004 (gmt 0)

10+ Year Member



I hope someone here can help me or redirect me to someone who can:

I am running a website with a huge mysql database. My problem is that I would like to offer my information to other related websites so I need a script or something that allows external websites to query my database and return results in customized html-code. The concept is closely related to a small search engine..

Does anyone have any ideas?

Thanks

raywood

12:26 pm on Apr 19, 2004 (gmt 0)

10+ Year Member



My first thought would be to expose the data as a web service and supply it in xml format to the user.

The ease of setting it up depends on what kind of server you use and what language your website is programmed in. Your users would also have to know how to consume web services.
ray

txbakers

12:48 pm on Apr 19, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Ray - this topic comes up enough that I'd love to see a tutorial on how to do this with mySQL.

If you know enough about it,can you jot down some frameworkk for getting it implemented?

jacknoir

3:15 pm on Apr 19, 2004 (gmt 0)

10+ Year Member



Thanks for pointing me in the right direction regarding the use of XML - haven't tried coding XML but will start looking into it...

But just to make absolutely clear what I am talking about, what I need is basically:

I want to offer certain search terms to other gambling related websites, like different payment options for instance (Neteller, Paypal etc..) When the user of the other website clicks on a search term, I need a script to implement on the other website that can access my MySQL database and return results as HTML on the other website. Normally I use PHP to access my database but this can only be done from within my own domain because of the security issues.

Hope this makes sense...

Cheers
Per

hdpt00

3:19 pm on Apr 19, 2004 (gmt 0)



Why not try and go the XML/RSS feed route. There are plenty of tutorials out there that tell you how to set up an RSS feed. You could make a script on your server that makes an XML feed for a search term (it is what many PPC SEs do). The script would simply be called from the other person's search script which in turn would point to something like www.yourdomain.com/?term=whatever and then you use a php script to parse your db for the term "whatever" and paste it into an XML file at that address. Shouldn't be too hard.

Of course this is just the basics, but it is quite simple as almost every PPC does it. Search for RSS tutorials or something to the likes of that.

-Brandon

raywood

6:29 pm on Apr 19, 2004 (gmt 0)

10+ Year Member



A web service supplying xml or an RSS feed really is the way to go. You just tell your users the interface details, and they can get the data no matter what scripting language they use. You don't have to supply them any script.

You control the security and authorization at your web server. Users never connect directly to your database. Only your web server does, so it works fine on a shared server.

I started playing around with this about a year ago. It seemed pretty confusing at first, but things started to make sense quickly. There is plenty of info about it on the web. Practically every web development site out there has a few how-to articles on it.
ray