PDA

View Full Version : Include whois script with php?



spiffshine
07-22-2005, 04:44 PM
I would like to display the domain lookup and results as a php include (http://www.ewinys.net/v2/domains.php)

I am able to display the form very easily... but is it possible to get the results to display inside the same page rather than loading whois.php on its own for the results?

I would prefer not to use an iframe because sizing issues would cause either a big nearly-blank box before the results show or having to scroll the frame after the results display... Please correct me if I'm wrong on this!

Also, SSI is not an option for my server.

Thanks in advance!

~Heather
"I know only enough to be dangerous..."

Patrick
07-22-2005, 08:13 PM
Yes, the script is easily capable of this.

Just include the whois script:

<?php include("/absolute/path/to/whois.php"); ?>

Then you just need to modify the search template to reflect the name of the page that you are including the file on in the form action field.

Example: You are including the script (whois.php) on a page named mypage.php:
Go to "Edit Templates" page in EP-Dev Whois Admin Panel and edit the "Search Bar" template:

REPLACE

<form name='whois_search' method='POST' action='[[site-url]]whois.php'>

WITH:

<form name='whois_search' method='POST' action='http://www.mysite.com/mypage.php'>

That is just an example, but you should probably get the idea. Don't forget to modify the multiple TLD search bar too (further down the Edit Templates page).

spiffshine
07-25-2005, 10:31 AM
Thank you! That worked perfectly!