public
Description: A Simple domain monitoring application
Homepage: http://www.domainhunter.org.tr
Clone URL: git://github.com/bmericc/domainhunter.git
Click here to lend your support to: domainhunter and make a donation at www.pledgie.com !
bmericc (author)
Wed Jul 09 11:28:48 -0700 2008
domainhunter / adddomain.php
100755 122 lines (83 sloc) 2.811 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<?php
/*
+-----------------------------------------------------------------------+
| Domain Hunter - A Simple Domain Monitoring Application |
| Version 0.1.0 |
| |
| Copyright (C) 2006-2007, DomainLabs.EU - Turkey |
| Licensed under the GNU GPLv3 |
| |
+-----------------------------------------------------------------------+
| Author: Bahri Meric CANLI <bahri@bahri.info> |
+-----------------------------------------------------------------------+
 
*/
 
include ("config.inc.php");
include ("header.inc.php");
include ("functions.inc.php");
include ("sorgu.php");
 
?>
 
 
<div id="edit_form">
<form name="create_domain" method="post">
<table>
<tr>
<td colspan="3"><h3>Add new domain</h3></td>
 
</tr>
<tr>
<td>Domain:</td>
<td><input class="flat" type="text" name="fDomain" value="" /></td>
<td>&nbsp;</td>
</tr>
<tr>
</td>
<td>&nbsp;</td>
</tr>
<tr>
<td colspan="3" class="hlp_center"><input class="button" type="submit" name="submit" value="Add domain" /></td>
</tr>
 
<?php
 
if ( (isset($_POST['fDomain'])) && ($_POST['fDomain'] !="") ) {
 
$domain = tr_strtolower($_POST['fDomain']);
 
$domain_array = explode(".", $domain);
 
if ( ( strlen($domain_array[0]) > 3 ) && ($domain_array[0]!="www") && ( ($domain_array[1]=="com") || ($domain_array[1]=="net") ) ) {
 
$realdomain = tr_strtoupper($domain_array[0].'.'.$domain_array[1]);
$error_status = standartcontrol($domain_array[0]);
 
}
else { $error_status = 8; $error_message = "version ".$script_version." only com and net extension <br> (example : domainhunter.com)"; }
 
 
if ($error_status==0) {
 
$var = mysql_result(mysql_query("SELECT count( id ) FROM `monitors` WHERE `domain` = '$realdomain' "),0,0);
 
if ($var == 0 ) {
 
$sql = "INSERT INTO monitors (domain) VALUES ('$realdomain')";
$results = mysql_query($sql);
 
echo '
<tr>
<td colspan="3" class="standout">Adding table domain!<br />(';
 
$z = hunter_islemci(tr_strtolower($realdomain));
 
echo ')</br></td>
</tr>
';
 
 
}
else { $error_status = 9; $error_message = "Existing domain in table"; }
 
}
else if ($error_status==4) { $error_message = "Does not IDN support"; }
 
 
 
  if ($error_status!=0) {
 
echo '
<tr>
<td colspan="3" class="standout">Error '.$error_status.' : '.$error_message.'</br /></td>
</tr>
';
}
 
 
}
else
 
{
 
echo '
<tr>
<td colspan="3" class="standout">&nbsp;</td>
</tr>';
 
}
?>
 
</table>
</form>
</div>
 
 
<?php
 
include "foother.inc.php";
 
?>