Welcome to Code Forum!

Join a community that supports you and your coding journey from day one. We strive to be a friendly, supportive community that empowers everyone to be better developers. By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Search results

  1. Mutiny

    PHP How to make an ip logger on a direct download link?

    Putting it all together and simplifying it a bit: <?php // Get User IP and details $ip = $_SERVER['REMOTE_ADDR']; $userAgent = $_SERVER['HTTP_USER_AGENT']; // Get geolocation data about IP $ipapi = json_decode(file_get_contents("http://ip-api.com/json/{$ip}")); // Your Telegram Credentials...
  2. Mutiny

    PHP How to make an ip logger on a direct download link?

    Actually, fread() is the wrong function for outputting the file, sorry about that. The correct function to use is readfile() which you are using in the latest code you posted. It's been a while since I've had to work with outputting a file directly like you are doing. What you have so far...
  3. Mutiny

    PHP How to make an ip logger on a direct download link?

    If you have multiple files you will need to do all the items to allow a choice of files. If you only have a single file users will ever download you could get away with only doing 2,3 and 4. I would recommend looking at the documentation I posted and trying a few things. If you get stuck you...
  4. Mutiny

    PHP Having problem involving getting database content to show up after passing a query string.

    Also, that SQL query is insecure as you're directly passing a value to the query, the $employeeid. You need to either escape the value using mysqli_real_escape_string or use PHP's prepared database statements.
  5. Mutiny

    PHP Having problem involving getting database content to show up after passing a query string.

    Have you tried echoing out the SQL query you are running and pasting it directly into your database program? If you get zero results when you are expecting a result that would cause the else to trip. Also, a syntax error in the query would also be treated like a no-result.
  6. Mutiny

    PHP How to make an ip logger on a direct download link?

    There are more efficient ways of storing IP addresses for what you seem to be doing (storing geo-location data) than having them sent one by one to Telegram. For instance, you could store the IPs and files downloaded in a database so you could create a report that lists files by location. The...
  7. Mutiny

    Sports Ticker

    Usually if they have one publicly available it would be listed somewhere on the site. But these look like smaller sites that probably don't have APIs. However, Wordpress does have an API available that may allow you to get some data, and at least that first site is running Wordpress. If you...
  8. Mutiny

    Sports Ticker

    Do they have an API where you could get the data in some common format like JSON? If they have an API you could probably do this pretty easily depending on the language you're using, but if they don't have an API it becomes more difficult as you have to parse / extract the data from another...
  9. Mutiny

    Java Help for my son.

    It looks like Microsoft has a product called MakeCode that is a block-like code editor similar to Scratch, but compatible with Minecraft: https://www.microsoft.com/en-us/research/blog/code-minecraft/
  10. Mutiny

    HTML & CSS How can I make small objects move out from behind a large object when I hover over it?

    I think what you will want to do is have a container that both the image the user will hover over as well as the item that will pop-out on hover will both live in. Then you want to make that container the thing that users hover over. What this lets you do is have your default set of classes...
  11. Mutiny

    Best free control panel for LAMP stack server?

    Does anyone have any suggestions for a good, free control panel for a LAMP stack server? Years ago I would use CPanel and DirectAdmin, but these cost just as much a month now if not more than hosting would on a VPS. I've played around with Webmin / Virtualmin and it seems to get the job done...
  12. Mutiny

    HTML & CSS #include for loading page navigation no longer working

    What happens when you try the PHP? Does your server even support PHP? The original code you posted is Microsoft ASP code. I don't think it would be a typical setup for a server to support both ASP and PHP. Can you ask your hosts which languages your site supports? I'm guessing they changed...
  13. Mutiny

    Script for "team picking"

    Yeah, you'll need a database to keep track of who users are as well as their points total as well as the players they have picked. You can keep track in real time, you'll just need to have some AJAX that fires when a user selects a player that updates their points total as well as which player...
  14. Mutiny

    HTML & CSS #include for loading page navigation no longer working

    Ah, ok, looks like that syntax is ASP, so there's something dynamic that should be doing the include. If it's always worked the same way and now it doesn't that suggests to me that something has changed. Do you manage this server, or do you have a webhost that does that for you? Maybe a...
  15. Mutiny

    How to mysqldump in a more secure way?

    Good question, I had to Google this one. Looks like the key is to store the password inside of a separate file that you then pass to the mysqldump command: https://stackoverflow.com/a/32409448
  16. Mutiny

    Script for "team picking"

    What languages are you using for the login / registration? I'm a PHP dev, so I would build all this in PHP with some AJAX / Javascript. You have the user's balance, say 20,000 points. For each footballer, you do an AJAX request that updates the user's session with their choice and the amount...
  17. Mutiny

    HTML & CSS #include for loading page navigation no longer working

    What do you mean you are using an #include? AFAIK, there isn't a way to directly include an HTML file inside of another HTML file. Are you doing a PHP include? Seeing the code would be helpful.
  18. Mutiny

    CSS Mobile menu not visible

    Do you have a link to the site? Without the HTML and a working link it will be hard to troubleshoot this.
  19. Mutiny

    CSS Whitened Out Button

    I don't see that widget on the homepage of that site, is it on another page? Is the issue that the "Send Email" button is yellow, or that all of the buttons are semi opaque / see-through?
  20. Mutiny

    CSS Need help with Responsive top nav with dropdown

    Try setting line-height: 10px; on your .dropdown elements.
Back
Top Bottom