tkeats Posted January 28, 2003 Share Posted January 28, 2003 OK, I get it all installed, was missing something but figured that one out (some reason the link didnt like exactly where I put it in the infobox. Anyways, this is the issue.. Warning: Supplied argument is not a valid File-Handle resource in /home/www/test.rainbowcomputers.ca/htdocs/catalog/domain_search1.php on line 76 Line 76? $displayblock = ""; for ($a=0; $a < $digits; $a++){ $displayblock .= "<td><img src=$img[$a]></td>"; } $opennewcount = @fopen($counterfile,"w"); @fwrite($opennewcount, $newcount); fclose ($opennewcount); Line 76 is the last line... Any help would be appreciated. The link is here test.rainbowcomputersystems.com/catalog Thomas Quote A signature is something that reflects its user. - The dictionary The question is not, 'to code, or not to code' the question is, 'if we do not code, are we really alive?' -- anonymous Link to comment Share on other sites More sharing options...
puddled Posted January 28, 2003 Share Posted January 28, 2003 Check in the catalog directory for a file called counter.dat, if it is there, CHMOD 777, if it is not there, create an empty plain text file of the same name, upload to your catalog directory, then CHMOD 777 Quote Instant idiot......Just add mud !! Link to comment Share on other sites More sharing options...
tkeats Posted January 29, 2003 Author Share Posted January 29, 2003 Cool, thanks that solved that, now I have begun customizing.. I want to add .ca functionality along with .cn and more. My first shot worked with few problems, bug wise (I just duplicated the .com). Changed the whois to whois.internic.ca and it was operational. However, when I search a domain I know is taken, in fact I used the same server just now through intenic.ca to get the exact url for the setting. My problem is I get this... Search for a Domain Name Checking please wait.... Available Taken Register rainbowcomputers.ca Its saying its not taken, what have I done wrong? Another issue I have discovered, is it adds a product to the database, which is all fine and dandy, but it charges shipping on the item. How do you change this? Thomas Quote A signature is something that reflects its user. - The dictionary The question is not, 'to code, or not to code' the question is, 'if we do not code, are we really alive?' -- anonymous Link to comment Share on other sites More sharing options...
puddled Posted January 29, 2003 Share Posted January 29, 2003 Hi Thomas, I have placed the latest whois servers list on my website for you to check through, you can find it at http://www.puddled.co.uk/servers_lst.htm just look through for the extensions you need, and then use the servers listed. For .ca you should be using whois.cira.ca and for ??.cn you should use whois.crnic.net.cn and for cn.com use whois.centralnic.com Quote Instant idiot......Just add mud !! Link to comment Share on other sites More sharing options...
tkeats Posted January 29, 2003 Author Share Posted January 29, 2003 Ok, I had that right.... This is a snip of the changes I did.... // Define lookup variables // .com domains $comserver = "whois.internic.net"; // server to lookup for domain name $comnomatch = "No match"; // string returned by server if the domain is not found // .ca domains $comserver = "whois.cira.ca"; // server to lookup for domain name $comnomatch = "No match"; // string returned by server if the domain is not found // .net name search $netserver = "whois.internic.net"; // server to lookup for domain name $netnomatch = "No match"; // string returned by server if the domain is not found --snip-- // This function displays an available domain function dispav($what) { global $fontface, $fontsize, $fontacolor, $infolinks, $reglink, $regurl, $newcount, $type, $domain, $price, $domain_q$ echo "<tr> <td nowrap align=center>"; if ($reglink=="yes") { switch ($type) { case com: $price="15.99"; break; case ca: $price="55.99"; break; case org: $price="15.99"; break; case net: $price="15.99"; break; case couk: $price="3.99"; break; case info: $price="6.99"; break; case orguk: $price="9.99"; break; case ukcom: $price="15.99"; break; case eucom: $price="12.99"; case name: $price="74.99"; break; case meuk: $price="7.99"; break; case uknet: $price="5.99"; break; case gbcom: $price="4.99"; break; case gbnet: $price="12.99"; case tv: $price="64.99"; break; --snip-- <tr> <td align=right> <form method=post action=domain_search1.php> <input type=hidden name=action value=checkdom> <input type=hidden name=type value=$type> <input type=hidden name=price value=$price> <input type=text name=domain size=30 value=$domain> </td> <td align=left> <font face=$fontface size=$fontsize color=$stdcolor> <SELECT NAME=type SIZE=1> <OPTION selected; VALUE=com> .COM <OPTION VALUE=ca> .CA <OPTION VALUE=info> .INFO <OPTION VALUE=net> .NET <OPTION VALUE=org> .ORG <OPTION VALUE=couk> .CO.UK <Option value=orguk> .ORG.UK <option Value=ukcom> .UK.COM <OPTION VALUE=eucom> .EU.COM <OPTION VALUE=name> .NAME <OPTION VALUE=meuk> .ME.UK <OPTION VALUE=uknet> .UK.NET <Option value=gbcom> .GB.COM <OPTION VALUE=gbnet> .GB.NET <option value=tv> .TV </SELECT> <input type=submit name=button value=Check> </form> </td> </tr> --snip-- if($type == "com") { $comarray = array($domain.".com"); $comcount = count($comarray); $i=0; for ($i=0;$i<$comcount;$i++) { $domname = $comarray[$i]; $query = $domname."@".$comserver; $result = ""; $ns = fsockopen($comserver,43); fputs($ns,"$domnamern"); while(!feof($ns)) $result .= fgets($ns,128); fclose($ns); if (eregi($comnomatch,$result)) { dispav($domname); } else { dispun($domname,$comserver); } } echo "<tr><td colspan=5 bgcolor=$sepcolor><font face=$fontface size=$fontsize> </td></tr>"; } // trail for .ca names if($type == "ca") { $netarray = array($domain.".ca"); $netcount = count($netarray); $i=0; for ($i=0;$i<$netcount;$i++) { $domname = $netarray[$i]; $query = $domname."@".$netserver; $result = ""; $ns = fsockopen($netserver,43); fputs($ns,"$domnamern"); while(!feof($ns)) $result .= fgets($ns,128); fclose($ns); if (eregi($netnomatch,$result)) { dispav($domname); } else { dispun($domname,$netserver); } } echo "<tr><td colspan=5 bgcolor=$sepcolor><font face=$fontface size=$fontsize> </td></tr>"; } --snip-- Still something is wrong, I've shown what I have here for reference. All I did was take the entries for the .com and duplicated them and changing com/.com to ca/.ca with the .ca being the 2nd domain selectable. I've gone over my changes til the cows came in, and I cant for the life of me figure out what I'm doing wrong... (I've used whois.internic.ca and whois.cira.ca as the servers. Niether returns an error, and both return a chance to 'register'). Not to mention that my local server that this is running on., a whois -h whois.cira.ca rainbowcomputers.ca returns full data... Please help? Thomas Keats Quote A signature is something that reflects its user. - The dictionary The question is not, 'to code, or not to code' the question is, 'if we do not code, are we really alive?' -- anonymous Link to comment Share on other sites More sharing options...
Guest Posted January 30, 2003 Share Posted January 30, 2003 ok, I am using the earlier version of domain search mod (where we have this file: domain_search1.php) and have this issue at hand: I added .biz domains by replacing info with biz wherever it was there in the file/s and I can very well include .biz searches, but ... I am not able to reserver .biz domains that are still available. The ones that are already booked are rightly placed with suitable links to the popup, but the ones that are not booked yet are also shown as available. Could some one help here please? here's my code for the domain_search2.php ... ( i renamed it so ) <?php /* $Id: privacy.php,v 1.18 2002/06/16 19:07:41 harley_vb Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2002 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DOMAIN_SEARCH); $location = ' » <a href="' . tep_href_link(FILENAME_DOMAIN_SEARCH, '', 'NONSSL') . '" class="headerNavigation">' . NAVBAR_TITLE . '</a>'; ?> <!-- insert the counter module --> <? $counterfile = "counter.dat"; $imagedirectory = "../images/"; $digits = 10; $opencount = @fopen($counterfile,"r"); $currentcount = fread($opencount, filesize($counterfile)); fclose($opencount); $newcount = $currentcount; ++$newcount; $numdigits = strlen($newcount); if ($numdigits > $digits) { $newcount = "0"; } else { } $actdigits = strlen($newcount); //>---------------------------------------------------------------------------< //> To use images other than gifs, you will need to modify the file extension < //> after the 'else' statement in the following loop. < //>---------------------------------------------------------------------------< for ($a=0;; $a++) { if ($a == $digits) { break; } else { $img[$a] = "$imagedirectory"; $img[$a] .= "0.gif"; } } //>---------------------------------------------------------------------------< //> To use images other than gifs, you will need to modify the file extension < //> after the $showdig variable in the following loop. < //>---------------------------------------------------------------------------< for ($a=0;; $a++) { if ($a == $actdigits) { break; } else { $showdig = substr($newcount, $a, 1); $img[$digits - $actdigits + $a] = "$imagedirectory"; $img[$digits - $actdigits + $a] .= "$showdig.gif"; } } $displayblock = ""; for ($a=0; $a < $digits; $a++){ $displayblock .= "<td><img src=$img[$a]></td>"; } $opennewcount = @fopen($counterfile,"w"); @fwrite($opennewcount, $newcount); fclose ($opennewcount); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo TITLE; ?></title> <base href="<?php echo (getenv('/HTTPS') == 'on' ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <link rel="stylesheet" type="text/css" href="/stylesheet.css"> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="1" cellpadding="1" align="center"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <BR><BR><table border="0" cellpadding="0" cellspacing="0" bgcolor="#ffffff" width="100%"><tr><td> <table border="0" cellpadding="1" cellspacing="0" bgcolor="#000000" width="100%"><tr><td> <table border="0" cellpadding="3" cellspacing="0" bgcolor="#6487dc" width="100%"><tr><td align="left"> <b><font class=option1><?php echo HEADING_TITLE; ?></b><br> <br> </td></tr></table></td></tr></table><br> </tr> </table></td> </tr> <?php // Define lookup variables // .com domains $comserver = "whois.internic.net"; // server to lookup for domain name $comnomatch = "No match"; // string returned by server if the domain is not found // .net name search $netserver = "whois.internic.net"; // server to lookup for domain name $netnomatch = "No match"; // string returned by server if the domain is not found // .org name search $orgserver = "whois.networksolutions.com"; // server to lookup for domain name $orgnomatch = "No match"; // string returned by server if the domain is not found // .info domains $infoserver = "whois.opensrs.net"; // server to lookup for domain name $infonomatch = "Not found"; // string returned by server if the domain is not found // .co.uk .org.uk domains $coukserver = "whois.nic.uk"; // server to lookup for domain name $couknomatch = "No match"; // string returned by server if the domain is not found // .org.uk domains $orgukserver = "whois.nic.uk"; // server to lookup for domain name $orguknomatch = "No match"; // string returned by server if the domain is not found // .uk.com domains $ukcomserver = "whois.centralnic.net"; // server to lookup for domain name $ukcomnomatch = "No match"; // string returned by server if the domain is not found // .eu.com domains $eucomserver = "whois.centralnic.net"; // server to lookup for domain name $eucomnomatch = "No match"; // string returned by server if the domain is not found // .biz names $bizserver = "whois.nic.biz"; $biznomatch = "No Match"; // .me.uk names $meukserver = "whois.nic.uk"; $meuknomatch = "No match"; // uk.net names $uknetserver = "whois.centralnic.com"; $uknetnomatch = "No match"; // gbcom names $gbcomserver = "whois.centralnic.com"; $gbcomnomatch = "No match"; // gbnet names $gbnetserver = "whois.centralnic.com"; $gbnetnomatch = "No match"; // tv names $tvserver = "whois.internic.net"; $tvnomatch = "No match"; // Define some look parameters $pagetitle = "Puddled.co.uk"; // page title used in meta section $backgcol = "white"; // general background color $fontface = "verdana"; $fontsize = "2"; $fontacolor = "green"; // color of an available domain $fontucolor = "red"; // color when not available $infolinks = "blue"; // color of additional links $sepcolor = "#cccccc"; // separator color $stdcolor = "black"; // header and footer font color $footersize = "1"; // size of the footer info font $errcolor = "red"; // color of error messages // Shall we use register link? (yes/no) $reglink = "yes"; // If yes, give the url, it can be your affiliate link $regurl = "http://shop.amplescope.com/product_info.php"; // Do you want a log file? (yes/no) $wantlog = "no"; // If yes, give the log file name here // remember to chmod the file to 777 (change permition to writable for everyone) $logfile = "whois.log"; // End of variables, you do not need to change anythin below this line. // This function displays an available domain function dispav($what) { global $fontface, $fontsize, $fontacolor, $infolinks, $reglink, $regurl, $newcount, $type, $domain, $price, $domain_query; echo "<tr> <td nowrap align=center>"; if ($reglink=="yes") { switch ($type) { case com: $price="450.00"; break; case org: $price="450.00"; break; case net: $price="450.00"; break; case info: $price="525.00"; break; case biz: $price="525.00"; break; case couk: $price="23.99"; break; case orguk: $price="9.99"; break; case ukcom: $price="15.99"; break; case eucom: $price="12.99"; break; case name: $price="750.00"; break; case meuk: $price="7.99"; break; case uknet: $price="25.99"; break; case gbcom: $price="24.99"; break; case gbnet: $price="212.99"; break; case tv: $price="64.99"; break; } tep_db_query("insert into " . TABLE_PRODUCTS . " values ('', '2', '" . $type . "', '', '" . $price . "', '', '0', '1', '1', '1', '', '" . $newcount ."', '9')"); //tep_db_query("insert into " . TABLE_PRODUCTS_DESCRIPTION . " values ('', '1', '". $what ."', '" . $type . "', '" . $newcount . "', '', '', '', '')"); tep_db_query("insert into " . TABLE_PRODUCTS_DESCRIPTION . " values ('', '1', '". $what ."', '" . $ext . "', '" . $newcount ."', '','','','')"); // $domain_query = tep_db_query(("select p.products_id from " . TABLE_PRODUCTS . " p where p.products_model = '" . $type . "' and p.manufacturers_id = '" . $newcount ."' ")); $domain_query = tep_db_insert_id(); echo "<a href=$regurl?products_id=$domain_query><font face=$fontface size=$fontsize color=$infolinks>Register</font></a>"; } else { echo " "; } echo "</td> <td nowrap align=center><font face=$fontface size=$fontsize color=$fontacolor><b>$what</b> </font></td> <td colspan=3> </td> </tr>"; } // Function to display an unavailable domain with additional links function dispun($what,$where) { global $fontface, $fontsize, $fontucolor, $infolinks; echo "<tr><td colspan=2> </td> <td align=center nowrap><font face=$fontface size=$fontsize color=$fontucolor><b>$what</b></font></td> <td nowrap align=center><a href='domain_search1.php' onMouseOver="window.status='Details about $what';return true" onMouseOut="window.status='';return true" onClick=javascript:window.open('whois.php?action=details&domain=$what&server=$where','details','scrollbars=1,copyhistory=0,directories=0,status=0,resizable=yes,width=500,height =400')><font face=$fontface size=$fontsize color=$infolinks>Details</font></a></td> <td nowrap align=center><a href=http://www.$what target=_blank><font face=$fontface size=$fontsize color=$infolinks>Goto</font></a></td> </tr>"; } function startborder() { echo "<table align=center width=600 border=0 cellspacing=0 cellpadding=0> <tr><td width=100% bgcolor=#000000> <table width=600 border=0 cellspacing=1 cellpadding=2> <tr bgcolor=#ffffff><td>"; } function endborder() { echo "</td></tr></table></td></tr></table>"; } function disperror($text) { global $fontface, $fontsize, $errcolor; startborder(); echo "<center><font face=$fontface size=$fontsize color=$errcolor><b>$text</b></font></center>"; endborder(); } function main() { global $sepcolor, $fontface, $fontsize, $stdcolor, $type, $domain, $footersize, $poweredby, $price; echo "<br>"; startborder(); echo " <table width=100% align=center cellspacing=0 cellpadding=1> <tr> <td colspan=2 align=center width=100%> <font face=$fontface size=$fontsize color=$stdcolor><b>Please enter your required domain name</b></font> </td> </tr> <tr> <td align=right> <form method=post action=domain_search1.php> <input type=hidden name=action value=checkdom> <input type=hidden name=type value=$type> <input type=hidden name=price value=$price> <input type=text name=domain size=30 value=$domain> </td> <td align=left> <font face=$fontface size=$fontsize color=$stdcolor> <SELECT NAME=type SIZE=1> <OPTION selected; VALUE=com> .COM <OPTION VALUE=info> .INFO <OPTION VALUE=net> .NET <OPTION VALUE=org> .ORG <OPTION VALUE=biz> .BIZ <OPTION VALUE=name> .NAME </SELECT> <input type=submit name=button value=Check> </form> </td> </tr> </table>"; endborder(); } function pageheader($body) { global $pagetitle; echo " <HTML> <head> <title>$pagetitle</title> </head> <BODY bgcolor=$body> "; } function pagefooter() { echo "</BODY></HTML>"; } if ($action == "details") { pageheader("white"); echo "<pre>"; $fp = fsockopen($server,43); fputs($fp, "$domainrn"); while(!feof($fp)) { echo fgets($fp,128); } fclose($fp); echo "</pre>"; echo "<p align=center><a href=javascript:window.close()><font face=$fontface size=$fontsize color=$stdcolor><b>CLOSE</b></font></a>"; pagefooter(); exit; } elseif ($action == "checkdom") { // Check the name for bad characters $msg = "Checking please wait...."; disperror($msg); if(strlen($domain) < 3) { $msg = "The domain name you typed is too short! It must contain minimum 3 characters"; pageheader($backgcol); disperror($msg); main(); pagefooter(); exit; } if(strlen($domain) > 63) { $msg = "The domain name you typed is too long! It may contain maximum 63 characters"; pageheader($backgcol); disperror($msg); main(); pagefooter(); exit; } if(ereg("^-|-$",$domain)) { $msg = "Domain names cannot begin or end with a hyphen or contain double hyphens!"; pageheader($backgcol); disperror($msg); main(); pagefooter(); exit; } if(!ereg("([a-z]|[A-Z]|[0-9]|-){".strlen($domain)."}",$domain)) { $msg = "Domain names can only contain alphanumeric characters or hyphens!"; pageheader($backgcol); disperror($msg); main(); pagefooter(); exit; } pageheader($backgcol); startborder(); echo " <table width=100% align=center cellspacing=0 cellpadding=1> <tr> <td nowrap align=center bgcolor=$sepcolor> <font face=$fontface size=$fontsize color=$stdcolor><b> </b></font> </td> <td nowrap align=center bgcolor=$sepcolor> <font face=$fontface size=$fontsize color=$stdcolor><b>Available</b></font> </td> <td nowrap align=center bgcolor=$sepcolor> <font face=$fontface size=$fontsize color=$stdcolor><b>Taken</b></font> </td> <td nowrap align=center bgcolor=$sepcolor> <font face=$fontface size=$fontsize color=$stdcolor><b> </b></font> </td> <td nowrap align=center bgcolor=$sepcolor> <font face=$fontface size=$fontsize color=$stdcolor><b> </b></font> </td> </tr>n"; if($type == "com") { $comarray = array($domain.".com"); $comcount = count($comarray); $i=0; for ($i=0;$i<$comcount;$i++) { $domname = $comarray[$i]; $query = $domname."@".$comserver; $result = ""; $ns = fsockopen($comserver,43); fputs($ns,"$domnamern"); while(!feof($ns)) $result .= fgets($ns,128); fclose($ns); if (eregi($comnomatch,$result)) { dispav($domname); } else { dispun($domname,$comserver); } } echo "<tr><td colspan=5 bgcolor=$sepcolor><font face=$fontface size=$fontsize> </td></tr>"; } // trail for .net names if($type == "net") { $netarray = array($domain.".net"); $netcount = count($netarray); $i=0; for ($i=0;$i<$netcount;$i++) { $domname = $netarray[$i]; $query = $domname."@".$netserver; $result = ""; $ns = fsockopen($netserver,43); fputs($ns,"$domnamern"); while(!feof($ns)) $result .= fgets($ns,128); fclose($ns); if (eregi($netnomatch,$result)) { dispav($domname); } else { dispun($domname,$netserver); } } echo "<tr><td colspan=5 bgcolor=$sepcolor><font face=$fontface size=$fontsize> </td></tr>"; } //trial for .org names if($type == "org") { $orgarray = array($domain.".org"); $orgcount = count($orgarray); $i=0; for ($i=0;$i<$orgcount;$i++) { $domname = $orgarray[$i]; $query = $domname."@".$orgserver; $result = ""; $ns = fsockopen($orgserver,43); fputs($ns,"$domnamern"); while(!feof($ns)) $result .= fgets($ns,128); fclose($ns); if (eregi($orgnomatch,$result)) { dispav($domname); } else { dispun($domname,$orgserver); } } echo "<tr><td colspan=5 bgcolor=$sepcolor><font face=$fontface size=$fontsize> </td></tr>"; } if($type == "info") { $infoarray = array($domain.".info"); $infocount = count($infoarray); $i=0; for ($i=0;$i<$infocount;$i++) { $domname = $infoarray[$i]; $query = $domname."@".$infoserver; $result = ""; $ns = fsockopen($infoserver,43); fputs($ns,"$domnamern"); while(!feof($ns)) $result .= fgets($ns,128); fclose($ns); if (eregi($infonomatch,$result)) { dispav($domname); } else { dispun($domname,$infoserver); } } echo "<tr><td colspan=5 bgcolor=$sepcolor><font face=$fontface size=$fontsize> </td></tr>"; } if($type == "couk") { $coukarray = array($domain.".co.uk"); $coukcount = count($coukarray); $i=0; for ($i=0;$i<$coukcount;$i++) { $domname = $coukarray[$i]; $query = $domname."@".$coukserver; $result = ""; $ns = fsockopen($coukserver,43); fputs($ns,"$domnamern"); while(!feof($ns)) $result .= fgets($ns,128); fclose($ns); if (eregi($couknomatch,$result)) { dispav($domname); } else { dispun($domname,$coukserver); } } echo "<tr><td colspan=5 bgcolor=$sepcolor><font face=$fontface size=$fontsize> </td></tr>"; } if($type == "orguk") { $orgukarray = array($domain.".org.uk"); $orgukcount = count($orgukarray); $i=0; for ($i=0;$i<$orgukcount;$i++) { $domname = $orgukarray[$i]; $query = $domname."@".$orgukserver; $result = ""; $ns = fsockopen($orgukserver,43); fputs($ns,"$domnamern"); while(!feof($ns)) $result .= fgets($ns,128); fclose($ns); if (eregi($orguknomatch,$result)) { dispav($domname); } else { dispun($domname,$orgukserver); } } echo "<tr><td colspan=5 bgcolor=$sepcolor><font face=$fontface size=$fontsize> </td></tr>"; } // trial insert for .biz names if($type == "name") { $namearray = array($domain.".name"); $namecount = count($namearray); $i=0; for ($i=0;$i<$namecount;$i++) { $domname = $namearray[$i]; $query = $domname."@".$nameserver; $result = ""; $ns = fsockopen($nameserver,43); fputs($ns,"$domnamern"); while(!feof($ns)) $result .= fgets($ns,128); fclose($ns); if (eregi($namenomatch,$result)) { dispav($domname); } else { dispun($domname,$nameserver); } } echo "<tr><td colspan=5 bgcolor=$sepcolor><font face=$fontface size=$fontsize> </td></tr>"; } // paste in here for remaining servers if($type == "uknet") { $uknetarray = array($domain.".uk.net"); $uknetcount = count($uknetarray); $i=0; for ($i=0;$i<$uknetcount;$i++) { $domname = $uknetarray[$i]; $query = $domname."@".$uknetserver; $result = ""; $ns = fsockopen($uknetserver,43); fputs($ns,"$domnamern"); while(!feof($ns)) $result .= fgets($ns,128); fclose($ns); if (eregi($uknetnomatch,$result)) { dispav($domname); } else { dispun($domname,$uknetserver); } } echo "<tr><td colspan=5 bgcolor=$sepcolor><font face=$fontface size=$fontsize> </td></tr>"; } if($type == "gbnet") { $gbnetarray = array($domain.".gb.net"); $gbnetcount = count($gbnetarray); $i=0; for ($i=0;$i<$gbnetcount;$i++) { $domname = $gbnetarray[$i]; $query = $domname."@".$gbnetserver; $result = ""; $ns = fsockopen($gbnetserver,43); fputs($ns,"$domnamern"); while(!feof($ns)) $result .= fgets($ns,128); fclose($ns); if (eregi($gbnetnomatch,$result)) { dispav($domname); } else { dispun($domname,$gbnetserver); } } echo "<tr><td colspan=5 bgcolor=$sepcolor><font face=$fontface size=$fontsize> </td></tr>"; } if($type == "gbcom") { $gbcomarray = array($domain.".gb.com"); $gbcomcount = count($gbcomarray); $i=0; for ($i=0;$i<$gbcomcount;$i++) { $domname = $gbcomarray[$i]; $query = $domname."@".$gbcomserver; $result = ""; $ns = fsockopen($gbcomserver,43); fputs($ns,"$domnamern"); while(!feof($ns)) $result .= fgets($ns,128); fclose($ns); if (eregi($gbcomnomatch,$result)) { dispav($domname); } else { dispun($domname,$gbcomserver); } } echo "<tr><td colspan=5 bgcolor=$sepcolor><font face=$fontface size=$fontsize> </td></tr>"; } if($type == "biz") { $bizarray = array($domain.".biz"); $bizcount = count($bizarray); $i=0; for ($i=0;$i<$bizcount;$i++) { $domname = $bizarray[$i]; $query = $domname."@".$bizserver; $result = ""; $ns = fsockopen($bizserver,43); fputs($ns,"$domnamern"); while(!feof($ns)) $result .= fgets($ns,128); fclose($ns); if (eregi($biznomatch,$result)) { dispav($domname); } else { dispun($domname,$bizserver); } } echo "<tr><td colspan=5 bgcolor=$sepcolor><font face=$fontface size=$fontsize> </td></tr>"; } if($type == "tv") { $tvarray = array($domain.".tv"); $tvcount = count($tvarray); $i=0; for ($i=0;$i<$tvcount;$i++) { $domname = $tvarray[$i]; $query = $domname."@".$tvserver; $result = ""; $ns = fsockopen($tvserver,43); fputs($ns,"$domnamern"); while(!feof($ns)) $result .= fgets($ns,128); fclose($ns); if (eregi($tvnomatch,$result)) { dispav($domname); } else { dispun($domname,$tvserver); } } echo "<tr><td colspan=5 bgcolor=$sepcolor><font face=$fontface size=$fontsize> </td></tr>"; } if($type == "meuk") { $meukarray = array($domain.".me.uk"); $meukcount = count($meukarray); $i=0; for ($i=0;$i<$meukcount;$i++) { $domname = $meukarray[$i]; $query = $domname."@".$meukserver; $result = ""; $ns = fsockopen($meukserver,43); fputs($ns,"$domnamern"); while(!feof($ns)) $result .= fgets($ns,128); fclose($ns); if (eregi($meuknomatch,$result)) { dispav($domname); } else { dispun($domname,$meukserver); } } echo "<tr><td colspan=5 bgcolor=$sepcolor><font face=$fontface size=$fontsize> </td></tr>"; } // part 3 - check eu domain names if($type == "ukcom") { $ukcomarray = array($domain.".uk.com"); $ukcomcount = count($ukcomarray); $i=0; for ($i=0;$i<$ukcomcount;$i++) { $domname = $ukcomarray[$i]; $query = $domname."@".$ukcomserver; $result = ""; $ns = fsockopen($ukcomserver,43); fputs($ns,"$domnamern"); while(!feof($ns)) $result .= fgets($ns,128); fclose($ns); if (eregi($ukcomnomatch,$result)) { dispav($domname); } else { dispun($domname,$ukcomserver); } } echo "<tr><td colspan=5 bgcolor=$sepcolor><font face=$fontface size=$fontsize> </td></tr>"; } if($type == "eucom") { $eucomarray = array($domain.".eu.com"); $eucomcount = count($eucomarray); $i=0; for ($i=0;$i<$eucomcount;$i++) { $domname = $eucomarray[$i]; $query = $domname."@".$eucomserver; $result = ""; $ns = fsockopen($eucomserver,43); fputs($ns,"$domnamern"); while(!feof($ns)) $result .= fgets($ns,128); fclose($ns); if (eregi($eucomnomatch,$result)) { dispav($domname); } else { dispun($domname,$eucomserver); } } echo "<tr><td colspan=5 bgcolor=$sepcolor><font face=$fontface size=$fontsize> </td></tr>"; } echo "</table>"; endborder(); if($wantlog=="yes") { $remote_addr = $REMOTE_ADDR; $today = date("d-m-y H:i", time()); if (file_exists($logfile)) { $fp = fopen($logfile,"a+"); $infolog = "Date: $today | IP: $remote_addr | $domainn"; fputs($fp, $infolog); fclose($fp); } } main(); pagefooter(); } else { pageheader($backgcol); main(); pagefooter(); } ?> </table></td> </tr> </table></td></tr> <!-- body_text_eof //--> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </table></td> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> Quote Link to comment Share on other sites More sharing options...
puddled Posted January 30, 2003 Share Posted January 30, 2003 Thomas, try the following // Define lookup variables // .com domains $comserver = "whois.internic.net"; // server to lookup for domain name $comnomatch = "No match"; // string returned by server if the domain is not found // .ca domains $comserver = "whois.cira.ca"; // server to lookup for domain name $comnomatch = "No match"; // string returned by server if the domain is not found try changing the above to // .ca domains $caserver = "whois.cira.ca"; // server to lookup for domain name $canomatch = "No match"; // string returned by server if the domain is not found --snip-- if($type == "com") { $comarray = array($domain.".com"); $comcount = count($comarray); $i=0; for ($i=0;$i<$comcount;$i++) { $domname = $comarray[$i]; $query = $domname."@".$comserver; $result = ""; $ns = fsockopen($comserver,43); fputs($ns,"$domnamern"); while(!feof($ns)) $result .= fgets($ns,128); fclose($ns); if (eregi($comnomatch,$result)) { dispav($domname); } else { dispun($domname,$comserver); } } echo "<tr><td colspan=5 bgcolor=$sepcolor><font face=$fontface size=$fontsize> </td></tr>"; } // trail for .ca names if($type == "ca") { $netarray = array($domain.".ca"); $netcount = count($netarray); $i=0; for ($i=0;$i<$netcount;$i++) { $domname = $netarray[$i]; $query = $domname."@".$netserver; $result = ""; $ns = fsockopen($netserver,43); fputs($ns,"$domnamern"); while(!feof($ns)) $result .= fgets($ns,128); fclose($ns); if (eregi($netnomatch,$result)) { dispav($domname); } else { dispun($domname,$netserver); } } echo "<tr><td colspan=5 bgcolor=$sepcolor><font face=$fontface size=$fontsize> </td></tr>"; } --snip-- And this part to :- // trail for .ca names if($type == "ca") { $caarray = array($domain.".ca"); $cacount = count($caarray); $i=0; for ($i=0;$i<$cacount;$i++) { $domname = $caarray[$i]; $query = $domname."@".$caserver; $result = ""; $ns = fsockopen($caserver,43); fputs($ns,"$domnamern"); while(!feof($ns)) $result .= fgets($ns,128); fclose($ns); if (eregi($canomatch,$result)) { dispav($domname); } else { dispun($domname,$caserver); } } echo "<tr><td colspan=5 bgcolor=$sepcolor><font face=$fontface size=$fontsize> </td></tr>"; } As for shipping, the shipping price is not added when teh product is inserted into the database, this is done by the checkout procedure Quote Instant idiot......Just add mud !! Link to comment Share on other sites More sharing options...
puddled Posted January 30, 2003 Share Posted January 30, 2003 Hi Sunny, the only thing I can see wrong with your is the following // .biz names $bizserver = "whois.nic.biz"; $biznomatch = "No Match"; the $biznomatch value should be Not Found to give you // .biz names $bizserver = "whois.nic.biz"; $biznomatch = "Not Found"; Quote Instant idiot......Just add mud !! Link to comment Share on other sites More sharing options...
puddled Posted January 30, 2003 Share Posted January 30, 2003 Sunny just spotted another error, <form method=post action=domain_search1.php> shound this not point to domain_search2.php Quote Instant idiot......Just add mud !! Link to comment Share on other sites More sharing options...
tkeats Posted January 30, 2003 Author Share Posted January 30, 2003 YOUTHEMANYOUTHEMANYOUTHEMAN!!! WOOOOHHOOOOOOOOOOO!!!! oh, btw, it works now ;) Thomas Keats Quote A signature is something that reflects its user. - The dictionary The question is not, 'to code, or not to code' the question is, 'if we do not code, are we really alive?' -- anonymous Link to comment Share on other sites More sharing options...
tkeats Posted January 30, 2003 Author Share Posted January 30, 2003 On another note. The fact that its made a shippable product. Is there anyway to have it flagged as a 'downloadable' product? I havent seen that bug come up so I assume there is no 'shipping' charged to it.. ;) Thomas Quote A signature is something that reflects its user. - The dictionary The question is not, 'to code, or not to code' the question is, 'if we do not code, are we really alive?' -- anonymous Link to comment Share on other sites More sharing options...
Guest Posted January 30, 2003 Share Posted January 30, 2003 Hi Sunny, the only thing I can see wrong with your is the following // .biz names $bizserver = "whois.nic.biz"; $biznomatch = "No Match"; the $biznomatch value should be Not Found to give you // .biz names $bizserver = "whois.nic.biz"; $biznomatch = "Not Found"; This Not Found text string was actually inconsequential, but yes, alright I was having two errors (my own doing): 1. The register link url was wrong (was earlier linking to a demo site of mine) 2. I changed the whois.nic.biz to whois.neulevel.biz But the refrain remains that the latest mod of domain search is still no worky .. quite simple bugs have been left in there ... e.g. the do/while at a number of places says $i$j while it should be $i<$j .. I guess the developers should release a mod only after thorough testing at their own end first. Puddled, you have done a good job at that, only some effort is expected from you to make it gr8. With best regards Sunny Quote Link to comment Share on other sites More sharing options...
Guest Posted August 12, 2003 Share Posted August 12, 2003 Hello Im using OS2 MS2 ive installed both domain versions but I keep getting this error on available domains: 1136 - Column count doesn't match value count at row 1 insert into products values ('', '2', '', 'whois.networksolutions.com', '', '', '0', '1', '1', '0', '', '6', '') [TEP STOP] I am using Indiv Shipping Contribution also would they conflict?? Any help would be appreciated Quote Link to comment Share on other sites More sharing options...
Guest Posted August 12, 2003 Share Posted August 12, 2003 sorry this probably belongs in support :? Quote Link to comment Share on other sites More sharing options...
Guest Posted June 12, 2004 Share Posted June 12, 2004 Why would you want it to add the names searched for to the database??, how can this be stopped?Help would be appreciated with this. Thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.