...

View Full Version : PHP mySqL and DNS???



sunadmn
04-20-2004, 06:58 PM
Good afternoon all I have a pretty simple webpage with some simple php to connect to my SQL DB and search for certain data. What I would like to do is have the ability to run a search in two tables depending on the input data from the form. Example I have a user who wants to lookup host www.mydomain.com and return both the forward and reverse records associated with that host, also I would like to be able to do this in reverse like if the user wants to search for an ip address like 10.0.0.0 and get the host attached to that and the reverse attached to that. If anyone know a good way of doing this could you please help as I am lost at this point.


Thanks
Sunadmn

sad69
04-20-2004, 07:10 PM
Ok so you're going to store this information in your DB? Or are you looking for some PHP functions that do this for your automatically (I know that you can do this in Java...).

Check out this link if your quest is for the latter:
http://faq.web2010.com/tutorial/demo_dns.phtml

If it's the former, then it's just a simple table lookup. Unless you don't know anything about how to query databases in PHP...

Hope that helps,
Sadiq.

sunadmn
04-20-2004, 07:35 PM
Actually I want to query the DB directly and not actually see what the world sees via lookup I want to be able to see what I have in the zone files that I have put into the DB.

sad69
04-20-2004, 08:19 PM
Alright, so you're using MySQL? And you've got a bunch of tables with data that are related somehow?

You're asking us how to query your database then? Well for anyone to help, it really depends on what your database looks like. Unless of course you know SQL and you know what your query should look like, then you're wondering how to use PHP to query your MySQL database using your SQL query?

I can't help you with setting up your SQL query as I don't know what your database looks like, but here's a couple of links that might help:
http://hotwired.lycos.com/webmonkey/99/21/index2a_page5.html?tw=programming
http://hotwired.lycos.com/webmonkey/99/21/index2a_page6.html?tw=programming

Good luck,
Sadiq.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum