-
Posts
253 -
Joined
alexandre's Achievements
-
yes thank you very much , the blocking of the ip address is being done without problems anymore, the only question remaining about this in my head would be, if not using the feature of the database especially designed to handle the ip adresses, would it be a wrong choice or if storing the ip address as a varchar 45 is fine , i did it this way because thats the first method to do that i saw on the internet but i am still unsure if there is a downside to not be using this database feature.
-
it worked the number one disapeared as i changed the tag for the include .. when i am thinking that i just wasted 4 days being mad at my code 😂
-
i honestly dont know about that. i thought it was simply the way to include php into html but i should have noticed the difference between the normal php tags and the ones i am using . i will go look this up . thank you for specifying it.
-
i just realized that not long ago i switched my code , instead of only using php to do everything, i declared the variables in php to then output them in the html but as it was before only with php , it wasnt showing those number one
-
thats strange ... i can see the number one everywhere now that i am aware of it 😂.. would you have a solution to this issue ? dos it count if it is included in the php part of the code because i just found that on the subscription page the countdown is included in the php and it doesnt show the boolean result.
-
even on google it doesnt say anything about this.. should i be including the file in the php and filter the output to only display the timer and not the boolean?
-
i use the same method to display my paginations and it is not showing me any boolean result.. , is there something i dont know with the use of the include in a table ? because, to me i dont see any logical reasons , my paginations are also included in the html so there isnt much difference left that can be. in the include above , i didnt close the line inside the quotes with semi column or whatever is called the dot and coma , but once i did it didnt changed anything.
-
for real? but why would it be appearing if i dont use a return for this exact boolean ? by that i mean that i have been using many includes and this is the first time it is returning a boolean.
-
so i am trying to include the timer of the events in the user profile table and for some reason there is a number 1 appearing from nowhere but only if i include the whole countdown file if i just paste the code in my profile file it doesnt appear but i also cant get the timer to set a date. i would need to figure why this number one is spawning for no reasons since this is not even showing on the actual subscription page initially working with the subscription countdown file and everything is working well on this side.. this is just strange. <?php $stmt = $con->prepare("SELECT subscriptiondate, sub_status FROM subscriptions WHERE user_id = ?"); $stmt->bind_param('i', $_SESSION['id']); $stmt->bind_result($sub_date, $sub_status); $stmt->execute(); $stmt->fetch(); $stmt->close(); if (isset($sub_date)) { $subscription_time = $sub_date; } else if (!isset($sub_date)) { $subscription_time = '2022-11-05 23:59:59'; } $rem_time = $subscription_time; $target = $rem_time; // SET OR GET TARGET TIME HERE $targ = new DateTime($target); $target_time = $targ->format('g:ia'); $target_date = $targ->format('F jS Y'); $remain = ['days' => 0, 'hrs' => 0, 'mins' => 0, 'secs' => 0]; #$dt1 = new DateTime( $_GET['target'] ); $dt2 = new DateTime('now'); if ($targ > $dt2) { $diff = $targ->diff($dt2); $remain['days'] = $diff->days; $remain['hrs'] = $diff->h; $remain['mins'] = $diff->i; $remain['secs'] = $diff->s; } ?> <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html charset='utf-8'"> <link rel="stylesheet" href="donation-clash.css" type="text/css"> <title>Countdown</title> </head> <body class="body4"> <div class="timerall"> <p class="p3">Countdown to</p> <p class='target'><?=$target_time?> on <?=$target_date?> </p> <table> <tr> <th>Days</th><th>Hours</th><th>Mins</th><th>secs</th> </tr> <tr> <td class='remain' id='days'><?=$remain['days']?></td> <td class='remain' id='hrs'><?=$remain['hrs']?></td> <td class='remain' id='mins'><?=$remain['mins']?></td> <td class='remain' id='secs'><?=$remain['secs']?></td> </tr> </table> </div> </body> </html> so this above is the countdown file for the subscription. <div> <p>registered to the:</p> <table> <tr> <th>Quicky event</th><th>Bronze event</th><th> Silver event</th><th>Golden event</th><th>Vip event</th><th class="sub_th">monthly Subscription</th> </tr> <tr> <td><?=$quicky_status?></td><td><?=$bronze_status?></td> <td><?=$silver_status?></td><td><?=$golden_status?></td><td><?=$vip_status?></td><td class="sub_th"><?=$subscription?></td> </tr> <tr> <td><?=$totalparticipant5?></td><td><?=$totalparticipant?></td><td><?=$totalparticipant2?></td><td><?=$totalparticipant3?></td><td><?=$totalparticipant4?></td><td class="sub_th"><?=include '../subscribe/sub_countdown.php'?></td> </tr> </table> </div> and this above is the part of the profile page including the countdown file. in the image you can clearly see under the timer that there is a 1 that should not be there. if anyone can find the cause of that , please let me know because it makes about 3 to 4 days that i am stuck on that ...
-
how to launch an attack on the detection of a brute force attack?
alexandre replied to alexandre's topic in PHP Coding Help
what would it take to force a hacker to shut his computer? i know for a fact that the infinite loop i got myself in and the forced shutdown have wiped my active file, so thats something i was wondering if i could reproduce on the attacker machine? -
how to launch an attack on the detection of a brute force attack?
alexandre replied to alexandre's topic in PHP Coding Help
it is just me wondering how i could launch a small and annoying counter attack on someone who is being attacking my website.. i know that my idea might not make sense for any of you , i am just wondering if it is doable to do something of this kind. the goal in this idea is not to damage the hacker's device but simply to annoy him and maybe give myself some time to actually take actions against a malicious attempt. -
i was thinking about triggering the redirecting on the attacker toward another page that open in a new window and this next page do something but always redirect toward a copy of this same file before running the script and so on , each windows could have each their script running if he doesnt close them all. does it seem doable?.
-
sorry i am not the fastest one sometimes. finally got it , the thing is that i rarely use functions and this protected in front of the function is making this unexpected and expect the end of file but if i removed it , everything work fine by putting the sample in a function file including it and call the function and simply did $user_ip = the function call.
-
i changed a bit the code and removed the function to just keep the condition and whatever i am doing the result remain the same, it only gives a null value as ip..
-
after all the little errors fixed i now get a null result for the ip address variable