How can I add multi domain to this TSDNS script

Sn0bzy

Member
Feb 20, 2016
16
1
38
Hello,

TSDNS Script: https://mega.nz/#!rIhAEZZC!7cdVnJnWp2FCC2yEToHKi2EOqBHBWnOtW9EPzNK1IgY
I have TSDNS web script. The script using cloudflare api. I can add 1 domain correctly, but I have 20 domain for TSDNS and I can't add my all domain on this script.
I was added my domain on config.php;
fcc01a6390cc4e15b1f783e6381c0213.png

I was edited index.php;
c44421e02809489f8c332524863ae260.png

And all domain options runs correctly;
40919714a0ed4cf598ec1dfafceb3dff.png


________________________________________________________________________

But
, when I select second or other domain and click "Create DNS" button, this script creating first domain DNS so ".clanspeak.tk"

Please help me! How can I use correctly this script?

Sorry for my bad English :(
 

Norvik

Retired Staff
Contributor
Jul 18, 2015
635
588
157
You have to assign values to the option tags.
Code:
<option value="<?php echo $domain ?>"><?php echo $domain ?></option>
Please learn how to use things correctly before you use them. This might helps you if you wanna learn how to use the <option> tag.
 

Sn0bzy

Member
Feb 20, 2016
16
1
38
You have to assign values to the option tags.
Code:
<option value="<?php echo $domain ?>"><?php echo $domain ?></option>
Please learn how to use things correctly before you use them. This might helps you if you wanna learn how to use the <option> tag.
I use this code but this is not run too
 

Norvik

Retired Staff
Contributor
Jul 18, 2015
635
588
157
Can you provide me the php part which receives the form? There is probably another issue.
 

Norvik

Retired Staff
Contributor
Jul 18, 2015
635
588
157
I'm not at home right now so I had to take a look at this with my phone which was kinda hard so I could be wrong but it seems like you are using the $domain variable no matter what the user selected. You aren't even checking what the user selected so the script is always using the default variable.
 

Lipaydi

1337
VIP
Jul 23, 2015
44
64
112
Other languages than English are not allowed.
Dostum sana yardim ederim. Ama bekle biraz disardayim pokemon oynuyoz :p
@Sn0bzy
 

Terror

Member
Dec 4, 2015
12
3
35
Quick and dirty:

config.php replace
PHP:
$domain    =    'clanspeak.tk';         // Your Domain
$domain2    =    'takil.ml';         // Your Domain
$domain3    =    'oynasana.cf';         // Your Domain
$domain4    =    'girsene.cf';         // Your Domain
$domain5    =    'hadikonus.tk';         // Your Domain
$domain6    =    'hadikonus.ml';         // Your Domain
$domain7    =    'konus.tk';         // Your Domain
$domain8    =    'ts3clan.ml';         // Your Domain
$domain9    =    'turkspeak.cf';         // Your Domain
$domain10    =    'konus.ml';         // Your Domain
$domain11    =    'konus.ga';         // Your Domain
$domain12    =    'konus.cf';         // Your Domain
$domain13    =    'konusalim.ml';         // Your Domain
$domain14    =    'timsipik.tk';         // Your Domain
$domain15    =    'turkce.cf';         // Your Domain
$domain16    =    'ts3clan.ga';         // Your Domain
$domain17    =    'turkspeak.ml';         // Your Domain
$domain18    =    'turkce.ml';         // Your Domain
$domain19    =    'klani.cf';         // Your Domain
$domain20    =    'oynasana.ml';         // Your Domain

with:

PHP:
$domains = array(
    'clanspeak.tk',
    'takil.ml',   
    'oynasana.cf',
    'girsene.cf',   
    'hadikonus.tk',
    'hadikonus.ml',
    'konus.tk',   
    'ts3clan.ml',   
    'turkspeak.cf',
    'konus.ml',   
    'konus.ga',   
    'konus.cf',   
    'konusalim.ml',
    'timsipik.tk',
    'turkce.cf',   
    'ts3clan.ga',   
    'turkspeak.ml',
    'turkce.ml',   
    'klani.cf',   
    'oynasana.ml'
);


index.php replace

PHP:
                <option>.<? echo $domain; ?></option>
                <option>.<? echo $domain2; ?></option>
                <option>.<? echo $domain3; ?></option>
                <option>.<? echo $domain4; ?></option>
                <option>.<? echo $domain5; ?></option>
                <option>.<? echo $domain6; ?></option>
                <option>.<? echo $domain7; ?></option>
                <option>.<? echo $domain8; ?></option>
                <option>.<? echo $domain9; ?></option>
                <option>.<? echo $domain10; ?></option>
                <option>.<? echo $domain11; ?></option>
                <option>.<? echo $domain12; ?></option>
                <option>.<? echo $domain13; ?></option>
                <option>.<? echo $domain14; ?></option>
                <option>.<? echo $domain15; ?></option>
                <option>.<? echo $domain16; ?></option>
                <option>.<? echo $domain17; ?></option>
                <option>.<? echo $domain18; ?></option>
                <option>.<? echo $domain19; ?></option>
                <option>.<? echo $domain20; ?></option>


with:

PHP:
<?php
foreach ($domains AS $domain) {
    echo '<option value="' . htmlspecialchars($domain) . '">' . htmlspecialchars($domain) . '</option>';
}
?>

success.php ADD below

PHP:
include("config.php");

this:
PHP:
$domain = isset($_POST['select']) && in_array($_POST['select'], $domains) ? $_POST['select'] : '';

if (empty($domain)) die('Error, invalid domain selected');

I haven't tested it but it should work
 

bronxaron

Restricted
Jan 17, 2016
18
3
35
Quick and dirty:

config.php replace
PHP:
$domain    =    'clanspeak.tk';         // Your Domain
$domain2    =    'takil.ml';         // Your Domain
$domain3    =    'oynasana.cf';         // Your Domain
$domain4    =    'girsene.cf';         // Your Domain
$domain5    =    'hadikonus.tk';         // Your Domain
$domain6    =    'hadikonus.ml';         // Your Domain
$domain7    =    'konus.tk';         // Your Domain
$domain8    =    'ts3clan.ml';         // Your Domain
$domain9    =    'turkspeak.cf';         // Your Domain
$domain10    =    'konus.ml';         // Your Domain
$domain11    =    'konus.ga';         // Your Domain
$domain12    =    'konus.cf';         // Your Domain
$domain13    =    'konusalim.ml';         // Your Domain
$domain14    =    'timsipik.tk';         // Your Domain
$domain15    =    'turkce.cf';         // Your Domain
$domain16    =    'ts3clan.ga';         // Your Domain
$domain17    =    'turkspeak.ml';         // Your Domain
$domain18    =    'turkce.ml';         // Your Domain
$domain19    =    'klani.cf';         // Your Domain
$domain20    =    'oynasana.ml';         // Your Domain

with:

PHP:
$domains = array(
    'clanspeak.tk',
    'takil.ml',  
    'oynasana.cf',
    'girsene.cf',  
    'hadikonus.tk',
    'hadikonus.ml',
    'konus.tk',  
    'ts3clan.ml',  
    'turkspeak.cf',
    'konus.ml',  
    'konus.ga',  
    'konus.cf',  
    'konusalim.ml',
    'timsipik.tk',
    'turkce.cf',  
    'ts3clan.ga',  
    'turkspeak.ml',
    'turkce.ml',  
    'klani.cf',  
    'oynasana.ml'
);


index.php replace

PHP:
                <option>.<? echo $domain; ?></option>
                <option>.<? echo $domain2; ?></option>
                <option>.<? echo $domain3; ?></option>
                <option>.<? echo $domain4; ?></option>
                <option>.<? echo $domain5; ?></option>
                <option>.<? echo $domain6; ?></option>
                <option>.<? echo $domain7; ?></option>
                <option>.<? echo $domain8; ?></option>
                <option>.<? echo $domain9; ?></option>
                <option>.<? echo $domain10; ?></option>
                <option>.<? echo $domain11; ?></option>
                <option>.<? echo $domain12; ?></option>
                <option>.<? echo $domain13; ?></option>
                <option>.<? echo $domain14; ?></option>
                <option>.<? echo $domain15; ?></option>
                <option>.<? echo $domain16; ?></option>
                <option>.<? echo $domain17; ?></option>
                <option>.<? echo $domain18; ?></option>
                <option>.<? echo $domain19; ?></option>
                <option>.<? echo $domain20; ?></option>


with:

PHP:
<?php
foreach ($domains AS $domain) {
    echo '<option value="' . htmlspecialchars($domain) . '">' . htmlspecialchars($domain) . '</option>';
}
?>

success.php ADD below

PHP:
include("config.php");

this:
PHP:
$domain = isset($_POST['select']) && in_array($_POST['select'], $domains) ? $_POST['select'] : '';

if (empty($domain)) die('Error, invalid domain selected');

I haven't tested it but it should work
if(data = $post not working.
 

xv3n0mx

Active Member
Mar 2, 2016
21
7
75
@Terror No working, If I want to create it myself in subdomain in another domain it says that it is not available.

It is caused by this:

PHP:
$datei = file("blacklist.data");

foreach($datei AS $ausgabe)
   {
   $zerlegen = explode("|", $ausgabe);
    
    if($zerlegen[1] == strtolower(umlautepas($_POST[subname])))
    {
    
    
    header('Location: index.php?p=error');
    exit;
    }
}
 
Top