Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/12/2020 in all areas

  1. Eh! If I knew how to do that, I would not come here to ask for help. I change this now, and I'm good for another 3 years, lol. I don't do programming.
    1 point
  2. Official PHP website in most cases is not of much use for people that ask for help in places like here, on the forum. I was certainly first there, looking into four or five examples from 5 to 9 years ago that were just repeating the official ones. I could not use it for what I came up with at the end. Anyhow, I was able to figure it out, test and get no errors reported while getting the desired result. And here is the full code, for whoever needs it in the future: function getMoneyUS( $pricesUS ) { $formatter = new NumberFormatter('en_US', NumberFormatter::CURRENCY); return $formatter->formatCurrency($pricesUS, 'USD') . PHP_EOL; } function getMoneyUSd( $pricesUS ) { $formatter = new NumberFormatter('en_US', NumberFormatter::CURRENCY); $formatter->setAttribute(NumberFormatter::MAX_FRACTION_DIGITS, 0); return $formatter->formatCurrency($pricesUS, 'USD') . PHP_EOL; } It's for USD in this example. To change the currency you change the locale in the second line, then the currency code in the following one. The first function is for regular prices with decimals, and the second one is for amounts with no decimals. I need this to show the discount amounts that are always shown as rounded numbers, like Save $20 and so on. MAX_FRACTION_DIGITS sets the number of decimals. Thanks
    1 point
  3. Could be to "host" your content on their site so that they get traffic. Could be to try to increase their own legitimacy. Bots harvesting content for their own websites to drive more traffic to them and increase their ad revenue. Google does a decent job of distinguishing actual sites from spam sites. Likely either malicious probes or bots trying to spam you. There are tools to identify traffic patterns and react accordingly. fail2ban is one of the most popular and is primarily used to throttle IPs sending too many requests. Everything they do boils down to increasing advertising revenue. Keywords. If your reputable site has particular keyword content (even from comments) then it begins to establish a correlation between your actual content and their keywords. It's a long con. There isn't a whole lot of sabotage like that out there. It's mostly about associating spam sites/content with legitimate sites/content, thus suggesting a relevance to their content. If your site covers subject matter A, B, and C, and comments on your site also suggest spammy subject matters X, Y, and Z, then it suggest people interested in the former may also appear to be interested in the latter.
    1 point
This leaderboard is set to New York/GMT-04:00
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.