• Member Avatar for Stefce
    Stefce

    Gave Reputation to Dani in How to count live visitors on a page?

    Your method will spit out more and more incorrect results over time.
  • Member Avatar for Stefce
    Stefce

    Replied To a Post in How to count live visitors on a page?

    But this works perfectly fine. All i need to do is make to not go -1 in the DB. I think that need to be made in update.php file but …
  • Member Avatar for Stefce
    Stefce

    Replied To a Post in How to count live visitors on a page?

    can you help me with this one dani ?
  • Member Avatar for Stefce
    Stefce

    Replied To a Post in How to count live visitors on a page?

    Before he exit the page i warn him with an Alert message i can put the ajax call there so the DB updates for -1 but the thing is it …
  • Member Avatar for Stefce
    Stefce

    Gave Reputation to Dani in How to count live visitors on a page?

    What happens if users just keep hitting the start button and then leaving the site and never hit stop? Won’t the counter just keep incrementing indefinitely and then be more …
  • Member Avatar for Stefce
    Stefce

    Replied To a Post in How to count live visitors on a page?

    This is miningbot file $('#start-button').click(function() { // Make an AJAX call to update the database $.ajax({ type: "POST", url: "update.php", data: {id: getPoolIdFromUrl('id'), start: true}, success: function(response) { console.log(response); }, …
  • Member Avatar for Stefce
    Stefce

    Replied To a Post in How to count live visitors on a page?

    I actually solved the problem yesterday just i forgot to update the thread P.S it still have bugs tho...
  • Member Avatar for Stefce
    Stefce

    Replied To a Post in How to count live visitors on a page?

    I am desperately trying this to work but i dont know why it doesnt insert/update the table ?? :S here is the updated code in the update.php file <?php if …
  • Member Avatar for Stefce
    Stefce

    Replied To a Post in Hi everyone, I'm Maul

    Hi and welcome Maul :)
  • Member Avatar for Stefce
    Stefce

    Began Watching Hi everyone, I'm Maul

    Hey I'm Aaron. I'm a 31 year old student and forum admin in New Zealand. Nice to meet you all.
  • Member Avatar for Stefce
    Stefce

    Replied To a Post in How to count live visitors on a page?

    So i come up with new solution and i think it will be the best. Since i have 2 buttons on the page Start mining & Stop mining I can …
  • Member Avatar for Stefce
    Stefce

    Replied To a Post in How to count live visitors on a page?

    Ok so i have new approach with cookies and session miningbot.php file <div class="live"><span class="visitor-count"><?php include('counter.php'); ?></span></div> <script> // Function to update the visitor count using AJAX function updateVisitorCount() { …
  • Member Avatar for Stefce
    Stefce

    Replied To a Post in How to count live visitors on a page?

    I removed it but still doesnt record new value to the table
  • Member Avatar for Stefce
    Stefce

    Replied To a Post in How to count live visitors on a page?

    So my database is with unique database index thats why this method dont work. Is there a different solution than this ?
  • Member Avatar for Stefce
    Stefce

    Gave Reputation to Dani in How to count live visitors on a page?

    Also, that last section is still incorrect. You cannot mix PHP variables into your javascript.
  • Member Avatar for Stefce
    Stefce

    Gave Reputation to Dani in How to count live visitors on a page?

    It doesn’t add a new row to the table each time you refresh the page?
  • Member Avatar for Stefce
    Stefce

    Replied To a Post in How to count live visitors on a page?

    So now i have in miningbot.html this JS code <script> // Get the id parameter from the URL const urlParamss = new URLSearchParams(window.location.search); const id = urlParamss.get('id'); // Send an …
  • Member Avatar for Stefce
    Stefce

    Gave Reputation to Dani in How to count live visitors on a page?

    On miningbot.html, you currently have: // Update the live visitor count on the page const visitorCountElement = document.getElementById('visitor-count'); setInterval(() => { fetch(`get_visitor_count.php?id=${id}`) .then(response => response.text()) .then(count => { visitorCountElement.textContent = …
  • Member Avatar for Stefce
    Stefce

    Replied To a Post in How to count live visitors on a page?

    This is great answer and it does update the table, but it doesn't display the count number on the page it self.
  • Member Avatar for Stefce
    Stefce

    Replied To a Post in How to count live visitors on a page?

    @jawass i want to count the total users that are inside a particular page for this example "mining pool". User can create mining pool links and share them, so i …
  • Member Avatar for Stefce
    Stefce

    Edited How to count live visitors on a page?

    I want to count and show live users counter on my page. My url structure looks like this `domain.com/miningbot?id=pool-v9w1x2y` The users which are inside the parameter should be counted, updated …
  • Member Avatar for Stefce
    Stefce

    Edited How to count live visitors on a page?

    I want to count and show live users counter on my page. My url structure looks like this `domain.com/miningbot?id=pool-v9w1x2y` The users which are inside the parameter should be counted, updated …
  • Member Avatar for Stefce
    Stefce

    Edited How to count live visitors on a page?

    I want to count and show live users counter on my page. My url structure looks like this `domain.com/miningbot?id=pool-v9w1x2y` The users which are inside the parameter should be counted, updated …
  • Member Avatar for Stefce
    Stefce

    Created How to count live visitors on a page?

    I want to count and show live users counter on my page. My url structure looks like this `domain.com/miningbot?id=pool-v9w1x2y` The users which are inside the parameter should be counted, updated …
  • Member Avatar for Stefce
    Stefce

    Began Watching How to count live visitors on a page?

    I want to count and show live users counter on my page. My url structure looks like this `domain.com/miningbot?id=pool-v9w1x2y` The users which are inside the parameter should be counted, updated …
  • Member Avatar for Stefce
    Stefce

    Replied To a Post in Pass POST parameter to other file

    Yes, the problem was in the passing the `POST` parameter from the file that was sending the parameters to `complete.php` file. I did it with COOKIES with the help of …
  • Member Avatar for Stefce
    Stefce

    Replied To a Post in Wierd BUG with USER location

    Yeah i just removed that function and now i am using only `$user_ip = $_SERVER['REMOTE_ADDR'];` It works flawless and i dont see any wrong using it like this. I was …
  • Member Avatar for Stefce
    Stefce

    Edited Wierd BUG with USER location

    I have this code <?php // Connect to the database $servername = "localhost"; $username = ""; $password = ""; $dbname = ""; // Create connection $conn = mysqli_connect($servername, $username, $password, …
  • Member Avatar for Stefce
    Stefce

    Edited Wierd BUG with USER location

    I have this code <?php // Connect to the database $servername = "localhost"; $username = ""; $password = ""; $dbname = ""; // Create connection $conn = mysqli_connect($servername, $username, $password, …
  • Member Avatar for Stefce
    Stefce

    Created Wierd BUG with USER location

    I have this code <?php // Connect to the database $servername = "localhost"; $username = ""; $password = ""; $dbname = ""; // Create connection $conn = mysqli_connect($servername, $username, $password, …
  • Member Avatar for Stefce
    Stefce

    Began Watching Wierd BUG with USER location

    I have this code <?php // Connect to the database $servername = "localhost"; $username = ""; $password = ""; $dbname = ""; // Create connection $conn = mysqli_connect($servername, $username, $password, …
  • Member Avatar for Stefce
    Stefce

    Replied To a Post in Pass POST parameter to other file

    > The URL structure in your PHP code looks as so: <a href="complete.php?id=<?=$offerid?>"> Yes because i am passing the offer id to the `complete.php` file and from there i need …
  • Member Avatar for Stefce
    Stefce

    Replied To a Post in Pass POST parameter to other file

    Here is the code that pass the name parameter // Make an HTTP POST request with the parameters var xhr = new XMLHttpRequest(); xhr.open("POST", "con.php", true); xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); xhr.send("amount=" + …
  • Member Avatar for Stefce
    Stefce

    Replied To a Post in Pass POST parameter to other file

    I don't get the part with the buggy code what do you mean by that? The URL structure in the `complete` file is looking correct `complete.php?id=38918&aff_sub4=` just the parameter is …
  • Member Avatar for Stefce
    Stefce

    Created Pass POST parameter to other file

    I am having a problem passing a `$_POST[]` parameter to another file via the URL. Look at the line 34 and 138. The line 34 is getting the URL parameter …
  • Member Avatar for Stefce
    Stefce

    Began Watching Pass POST parameter to other file

    I am having a problem passing a `$_POST[]` parameter to another file via the URL. Look at the line 34 and 138. The line 34 is getting the URL parameter …
  • Member Avatar for Stefce
    Stefce

    Replied To a Post in Where to host my MP4 files

    @john_111 yes i found those too but i have custimized the html5 video so it looks like its playing on LIVE currently. And i will not be able to customize …
  • Member Avatar for Stefce
    Stefce

    Replied To a Post in Where to host my MP4 files

    I actually read the link you posted and found a tool named "HandBrake" it compresses the video without losing the quality. I put a video with 860MB `mp4` file. It …
  • Member Avatar for Stefce
    Stefce

    Replied To a Post in Where to host my MP4 files

    I am sorry but i didn't understanded you. Do you say i need to convert my mp4 file into different format?
  • Member Avatar for Stefce
    Stefce

    Replied To a Post in Where to host my MP4 files

    anyone?
  • Member Avatar for Stefce
    Stefce

    Created Where to host my MP4 files

    I have a website that have 6 videos from +500MB to +1GB i have uploaded them my other hosting which is not same as the website thinking it would not …
  • Member Avatar for Stefce
    Stefce

    Began Watching Where to host my MP4 files

    I have a website that have 6 videos from +500MB to +1GB i have uploaded them my other hosting which is not same as the website thinking it would not …
  • Member Avatar for Stefce
    Stefce

    Replied To a Post in Open webcam from browser javascript

    Did i make it correct like this? Tried but doesn't work document.addEventListener("DOMContentLoaded", () => { var but = document.getElementById("but"); var video = document.getElementById("vid"); var mediaDevices = navigator.mediaDevices; vid.muted = true; …
  • Member Avatar for Stefce
    Stefce

    Gave Reputation to rproffitt in Open webcam from browser javascript

    To me it shows this is not a code issue. Just how modern(?) browsers work now. In other words, nothing broke in your code. What you might have to do …
  • Member Avatar for Stefce
    Stefce

    Replied To a Post in Open webcam from browser javascript

    I can share the url but its not appropiate for the forum... I just find out if i got to the locker icon at the top of the browsers and …
  • Member Avatar for Stefce
    Stefce

    Replied To a Post in Open webcam from browser javascript

    I think the solution is to manually check the permissions and if user grands them than to open the cam. But so far i cannot make it. I hope someone …
  • Member Avatar for Stefce
    Stefce

    Replied To a Post in Open webcam from browser javascript

    Yes thats correct behavior but i restarted the devices and its still not working. And plus i have called my friend to check and he reported back the same How …
  • Member Avatar for Stefce
    Stefce

    Replied To a Post in Open webcam from browser javascript

    As i remember i clicked "Deny" on the permissions when visited through mobile yesterday, i visited through 3 different mobile devices and the webcam was starting correctly. And That was …
  • Member Avatar for Stefce
    Stefce

    Gave Reputation to Skillz_1 in Open webcam from browser javascript

    I didn't quite understand, what exactly do you need?
  • Member Avatar for Stefce
    Stefce

    Replied To a Post in Open webcam from browser javascript

    Yes my website is prottected with https with CloudFlare I just want to open the camera through browsers on mobile and desktop successfully :)

The End.