Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

You will need to convince your fans and customers alike to pay a subscription.

But, of course, we already try to do that.

Take me for example. I'm simply UNABLE to find technical consulting on the level of quality available here.

And, yet, you have chosen not to subscribe to DaniWeb Premium, despite our best attempts at pushing it in your face. When you click your avatar in the top right of any page, there's a link to upgrade your membership in the dropdown, so anytime you want to go to your control panel, or even just to log out, it's there. There's a section in your control panel to upgrade your membership. And, of course, the big one is when you ask a question. We assume people are like you and they benefit the most from DaniWeb when they ask questions that get high quality answers. The Publish tab whenever you contribute a topic/question encourages you to upgrade your membership. There must be something we are not doing well enough that is not convincing you enough to subscribe, despite you saying that you're "simply UNABLE to find technical consulting on the level of quality available here."

The worth of the help here is invaluable. You just need to get me to pay for it.

So, again, the question I need to ask is what is going through your mind that is stopping you from paying for DaniWeb Premium. Why are …

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

I'm not sure if you're still following this thread, but I think you're confounding paths in the HTML code relative to the domain root, and paths in the PHP code relative to the server's file system root.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Looking at the bullet points on the page you've linked to, it looks as if the HTML code is correct for listing list items. However, normal paragraphs have the CSS code (among other CSS rules):

.article-page .article-content p {
    margin-left: auto;
    margin-right: auto;
    max-width: 820px;
}

On the other hand, unbulleted lists have the CSS code:

dl, ol, ul {
    margin: 0;
}

I have no experience with Shopify, but if you have the ability to manually set CSS anywhere, you can fix your problem by adding the CSS:

.article-page .article-content ul {
    margin-left: auto;
    margin-right: auto;
    max-width: 820px;
}
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

These days it is all about SEO, AI, and backlinks.

I just want to add that, given my extensive SEO background, I definitely want DaniWeb to have a place for SEO, SEM, and all that jazz. However, we definitely need to have more coding questions too! Unfortunately, I feel like coding questions really all go to Stack Overflow these days.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Dani, is it your wish to monetize the board?

DaniWeb has been my livelihood, and quite profitable, from 2002 up through 2019. For many years, we were one of the most popular sites on the web. Unfortunately, I then got very sick and was bedbound for a long time, entirely unable to look at a computer screen. I now have cancer as well as some other serious health issues going on, and regaining my health is my primary focus, so DaniWeb took a backseat.

Monetizing this board would not be as difficult as perhaps some people here seem to think it would be.
Likewise driving traffic would be borderline trivial.

I have a lot of SEO experience, most of which came from growing DaniWeb, at its peak, to over 10 million visitors a month. I have to disagree with you that driving traffic is trivial. However, I'm always open to new ideas and suggestions, especially when it comes to figuring out ways to regain our popularity after being "dormant" for so long.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

I’m locking this topic because, unfortunately, instead of leading to interesting discussion, it turned into AI-generated post after AI-generated post repeating what AI is. (They’ve since been deleted.)

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Hello and welcome to DaniWeb! I can't say I have any interest in fashion or style, I'd love to talk shop with you about content creation and SEO.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Hi and welcome! I haven’t looked at Python since college, but I can help with any and all php questions you might have, should you decide to venture down that road.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Hello! Nice to virtually meet you.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Daniweb’s forums are not a marketplace and we don’t allow solicitations. However, may I recommend Upwork or (for higher budgets) Toptal? I have had a really good experience hiring from Upwork.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Most blog articles and social media posts are now AI-generated, for starters.

rproffitt commented: Ouch. Also I was just told about i n s t a b l o g g e r. +17
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Why does it sound like your introduction was written by ChatGPT?

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

I can only speak for the limited experience I have in coding DaniWeb. What we do differs mainly between if the HTTP request that's requesting the PHP page uses GET or POST. In the case of a POST request, we're most likely signing up, creating a post, editing a user profile, etc. In the case of a GET request, we're most likely just reading content and not modifying the database.

GET Requests:

  • Open a persistent MySQL connection at the beginning of the PHP script
  • Execute n number of MySQL queries (typically 0-3) throughout the PHP script

POST Requests:

  • Open a non-persistent MySQL connection at the beginning of the PHP script
  • Start a transaction
  • Execute n number of MySQL queries (typically 3-5) throughout the PHP script
  • End the transaction
  • Close the MySQL connection

On average, a rough guess is that each script takes about 120 ms to execute for an end-user. HTTP latency then brings that number closer to 200 ms (of course, depending on where in the world you are, this is often much higher) from HTTP request to response.

We then do run PHP scripts in cron jobs to do things like send emails and perform some heavy calculations. We do this much the same way as our GET requests, in that we open a persistent MySQL connection. The cron job often executes a couple really complex MySQL queries that might take as much as a second or more to execute. There's also a lot …

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

So I went ahead and made sure to connect.close() everywhere that I opened a connection

How many times do you have a single script opening and closing a connection to MySQL? Is this a web script?

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Are you connecting to MySQL with persistent connections? What happens if you don't use persistent connections?

Also, I'm confused what you mean about it complaining about too many connections simply by you changing how many records a single connection works with?

cored0mp commented: responded below, thanks +2
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Hi and welcome to DaniWeb!!

You'll find that, while we haven't had a lot of user activity as of late (I have been very sick for the last few years which has made it hard to put my energy into DaniWeb), we used to be the most popular C/C++ community on the web back in the day. You'll find a lot of interesting content if you search back a bit.

Lihui Zhang commented: Thank you for your comment. It's understandable that your health has taken precedence, and I hope you're feeling better now. +0
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

That seems like a worse solution. There’s no performance nor complexity advantage to using jQuery. Your previous example was much better.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

That's only if he chooses not to use jQuery.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Unfortunately a bug was preventing alexxx1 from posting. He messaged me:

Btw the location js is resolved. I needed to add fetch()

I'm honestly confused where he needed to add fetch()?

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

What I mean is, can you please provide the URL on spaces.w3schools.com, so that I can see if maybe it's a CORS issue that is causing the problem. (That's my best guess as to what the problem is, but if I can check out the URL, I can investigate further.)

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

... In other words, we already see it works at the live demo at https://www.w3schools.com/howto/tryit.asp?filename=tryhow_js_countdown

There has to be something on your website that is causing the javascript to break, but without actually seeing your website, there's no way to diagnose the issue.

It's like saying that your lights don't turn on, and asking an electrician to figure out why, but only sending them a photograph of the lightbulb. Yes, from the photograph, they might be able to tell you that the bulb is blown. However, if that wasn't it, it might not be working because there's a problem with the light switch. It might not be working because of a problem with the circuit breaker. It might not be working because of a problem with the electrical company.

I already saw a screenshot of your code and saw some glaring typos that were causing syntax errors. Now that your updated code doesn't show any "quick fixes", I need to actually look at the webpage to investigate why it's not working.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

I'm sorry. I wasn't near my computer over the weekend.

It's really impossible to debug what's wrong with your code when all I'm seeing is a screenshot of a portion of it. For example, it might be CORS that is causing it to not work, but there's no way of investigating that without actually checking the HTTP headers of the actual URL.

Please provide a public link to the actual webpage you'd like help with. Alternatively, please set up a dummy test page and provide a link to that.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Can you please share a public link to a URL where you are testing/using it so that I can investigate further?

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

What happens when you just go to the URL https://api.snoopi.io/check?apikey=MY API KEY ? Does the API correctly provide your location in JSON format?

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Please show me your code. You must be doing something wrong still.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

You can see that the countdown.js file has the little squiggle red underline on lines 27, 28, and 29, indicating that there's some type of syntax error there.

The problem is that you have a typo on line 26. It should not be distance < /> 0.

You also have a red squiggle on line 10 because the close bracket you have on line 7 shouldn't be there.

I'm not sure if you have any other typos.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

It should run with a link to the .js file. You just need to then also upload the JS file :) How to do that was my second option.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Google's Geospatial API works in any region where Google Street view exists. If Google Street view doesn't exist for a given area, the API won't be able to generate data for that area. Sorry.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

The code $_SESSION["cart_item"][$k]["quantity"] += $_POST["quantity"]; means that, whatever the value within $_POST['quantity'], you want to add that value to $_SESSION["cart_item"][$k]["quantity"].

The error of unsupported operand types means that you're trying to add values that can't be added. For example, The value of $_POST["quantity"] might be the string "abc" and you can't add abc to a number, as that would make no sense.

As you point out, it's a ton of code for me to spend my time reading and sifting through, especially because a lot of it isn't commented, so it's hard to understand what each line or section is doing, since I can't follow your logic.

However, what I can be sure of is you're getting the error because one, or both, of the variables you're working with are not numbers. Trace your code and make sure that there are no edge cases where $_SESSION["cart_item"][$k]["quantity"] is not a number, does not exist, is null, etc. Also, type cast $_POST["quantity"] into floatval($_POST['quantity']) to force it to be a floating point number, since it's being retrieved from $_POST which, theoretically, anyone can pass in literally anything there since it's unsanitized user input. The line should now look like:

$_SESSION["cart_item"][$k]["quantity"] += floatval($_POST["quantity"]);

We can then guarantee that at least the number being passed in is a float. You now need to ensure that the session variable is also guaranteed in all cases to be a number.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

You need to include all of the code in order to put everything together to get a working timer. The code <span id="demo" class="demo"></span> is HTML which we're using as a placeholder for where the timer should be. Then, the javascript actually is what makes the timer function, with code that keeps updating the HTML within that <span> tag.

If you copy and paste all of the HTML and Javascript code in the working demo here, and put it into an HTML page, you can build your own timer.

Alternatively, you can break it up into two files, uploaded to the same directory on the www, as so:

timer.html:

<!DOCTYPE HTML>
<html>
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <style>
    p {
      text-align: center;
      font-size: 60px;
      margin-top: 0px;
    }
    </style>

    // Note we add this here to reference where the JS file is
    <script src="./countdown.js">
</head>
<body>

<p id="demo"></p>

</body>
</html>

countdown.js:

*Everything within <script> and </script> tags in the demo, as so:

// Set the date we're counting down to
var countDownDate = new Date("Jan 5, 2030 15:37:25").getTime();

// Update the count down every 1 second
var x = setInterval(function() {

    [...]

}, 1000);

I hope this makes some sense. Please reply if you have any follow up questions.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Hello and welcome!!

Anam_5 commented: thanks +0
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Hi and welcome!

devin-dev commented: Thank you! Glad to join. I work in AI and digital transformation at Sky Solution, so happy to share insights and learn from you all! +0
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

I don’t see them mention anyone. You’re the one who mentioned that company and, in doing so, gave a vote up for that company’s SEO in Google’s eyes.

Google doesn’t just care about links. They also care A LOT about brand mentions.

Similarly, the OP doesn’t care that you have negative things to say about the brand to the handful of people who stumble upon this thread. What they care about is that you mentioning their brand just gave a huge boon to their SEO.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Would love to hear your experience :)

(Just please don’t promote or link to products or services you’re affiliated with. That’s a violation of our policies.)

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

That other thread has been deleted for being entirely AI-generated content.

To answer your question, you WANT me to say that the answer is B, but the truth is that none of the four techniques you mentioned work anymore. Google caught onto guest blogging a couple of years ago, and blatant guest blogging won’t help you the way it did 2 years ago.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Does anyone use Bytes.com?

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Make sure your website ranks on search engines for terms like "cleaning services near me".

If you work on getting into Google Maps with a prominent Business Profile, you'll automatically rank for "[...] near me". Have every client you get write a review. Reviews help.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

I would focus on Google Local, Yelp, Houzz, Angies, Handy, etc.

There are also local referral organizations where you can pay for membership. They typically include services like one handyman service, one house painter, one landscaper/gardener, one cleaning service, etc. Members of the group meet once a month or so to get to know each other and share ideas with each other, and typically refer their clients to other members within the group.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

There are only two ways for SEO tools to get a count of how many backlinks you have. The first is by utilizing their own web crawler, that crawls every page of the web, and tries to collect lists of backlinks pointing to each other URL on the web. The second is by using an API that taps into the data provided by one of the tools that utilize their own web crawler.

The answer to your question is simply that Google has discovered more backlinks than other tools with much more limited resources in crawling every page on the web.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Can you please show us your code and explain what the expected behavior is and what is not working?

$_SERVER['DOCUMENT_ROOT']; reflects the path on the server that serves as the root path / for the website. When you set $path = $_SERVER['DOCUMENT_ROOT']; you are setting a PHP variable named $path to whatever the value of the document root is, but it doesn't actually do anything with that beyond set the variable.

It's possible you're using a CMS or framework of some kind that does something with a $path variable, but without seeing any code, it wouldn't do anything.

Also, when you say styles, are you referring to the theme files for a CMS? Or CSS stylesheets? I'm not sure what you're referring to here.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Hello and welcome!! What brings you here?

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

I'm personally not familiar with Android development, but I'm sure there is app storage.

https://developer.android.com/training/data-storage

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

For sure, we use Schema.org very heavily here at DaniWeb. I don't necessarily consider those meta tags, although I suppose they could be perceived as such.

As far H1, H2, etc. tags, those are semantic HTML elements, and definitely not meta tags.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Any external link that points to your website is technically a backlink by definition.

Do you mean they aren’t showing as links in Google Search Console? GSC only shows a subset of backlinks that it knows about. Additionally, quality and relevance of the links matter more than anything else.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Locking this topic because it seems to be just swarmed with AI-generated content.

Salem commented: Yes!!!! +16
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

I am of the opinion that meta tags are next to useless for SEO nowadays.

Google officially stopped using meta keywords back in 2009 according to https://developers.google.com/search/blog/2009/09/google-does-not-use-keywords-meta-tag and I’m pretty sure they give very little weight to meta descriptions for at least the past decade.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

A long time ago I had a tool that imported a person's top business matches per the DaniWeb API into Salesforce as potential leads.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

It's been really hard to keep up with promoting the website and SEO ever since I got sick.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

I was more into DaniWeb before the changes

What changes? You mean just how our traffic/activity has decreased over the years?

Owh @Dani,are you referring to the one and only Jim that we have here at Dw?

My friend Jim Boykin isn’t active on DaniWeb, I’m afraid. I’m pretty sure he’s a member, but not an active one.