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

Hi!

I’m sorry you’re having a difficult time navigating the site.

To find the latest topics to respond to, click “Read” in the top navigation menu, to the right of the search bar.

Alternatively, click the little hamburger menu (the three lines) to the left of our logo in the top navigation menu. Under the Social section is a link to our forums. Is that what you are looking for?

Olive34 commented: Is there a way to reply other than "Comment" link, then "Vote with Comment"? +0
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

I f***ing hate Google anymore. 5 years ago you would have searched that and found a definite answer and guide on how to find your password. I'm gonna guess you got a bunch of poorly written articles from strange websites that weren't actually helpful?

Those strange websites containing poorly written articles were written by ChatGPT.

rproffitt commented: A few of us think the number of AI written articles is now in the millions. Stay tuned. +17
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Kind of makes it hard to form a correlation between the cause and the effect when the separation can be a year or more.

Oh, and also, keep in mind that in that year-long timeframe while you're waiting to see if the changes you made had any positive impact, Google additionally released 300+ other algorithm updates. Any one of them could account for dips and improvements to traffic over the year.

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

Hi iandreas! It's so nice to have you here and welcome.

Regarding rproffitt's questions, he's been on a mission lately to study everything he can about what's going on with ChatGPT.

Also, what do you think is the knock on effect on SEO? If you don't do this too, your SEO can suffer as Google has yet to show they can detect such content.

rproffitt, why do you think that a site's SEO suffers if it doesn't post millions of AI-based articles? Or am I misunderstanding you?

iandreas1 commented: Thank you Dani! +0
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

My code comments are typically just notes to myself to refresh my memory of why I did something a certain way, or tongue-in-cheek jokes to myself. It's very heavily commented though. Oh the joys of being the only one working on this platform for two decades.

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

Also, just so that Olive realizes as she’s new here, what I was referring to is the platform that powers this site, DaniWeb, which I’ve been working on since 2002.

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

I think he’s just refactoring the existing spaghetti code, if I understand correctly.

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

Also, I appreciate you not linking to adult material from DaniWeb, as we are a student-friendly community for everyone 13+.

We'll get this figured out for ya.

Steve_63 commented: Besides I'm conversing with a woman and I consider myself a gentleman. I wonder if I could send the html by PM, then you can decide if it's fit. +0
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Data is just an associative array of table fields and their values.

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

Did adding the PHP code:

header("content-security-policy: form-action 'self' https://www.paypal.com");

to your PHP page that contains the PayPal button not fix your problem?

CSP is simply an HTTP header that gets spit out from your PHP code (or whatever other programming language you happen to be using). It doesn't really "live" anywhere, as it's not something that is installed on your server or anything like that.

If the above PHP code didn't work, please link me to the webpage that includes the PayPal button.

Steve_63 commented: Only just seen this Dani, I will try it tomorrow (later!) as it's nearly 3am. My sincere thanks to you +0
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

OK, so then looking at the URL "$click?$namehref" it looks like that translates to a URL such as https://nerjabible.com/output/linkcounter.php?<some directory name>

Query strings need to be a key-value pair, meaning something like keyword=<some value here>. Therefore, the URL should be properly written as https://nerjabible.com/output/linkcounter.php?namehref=<some directory name>. In your PHP code, you would want it to look like this:

$line = "<a href=\"$click?namehref=$namehref\"><font color='red'>$name</font> </a>"; 

Then, in the linkcounter.php file, you can do something such as:

$namehref = $_GET['namehref'];

and that will fetch the parameter from the URL string.

Alternatively, you can do something such as:

$line = "<a href=\"$click?any_variable_name=$namehref\"><font color='red'>$name</font> </a>"; 

and then, in linkcounter.php, you would have:

$variable_retrieved_from_url = $_GET['any_variable_name'];

I hope that this makes sense!! Feel free to ask if you have any follow-up questions to get it working.

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

As I came across your recent rant about CSP, is it still giving you trouble? Can I provide more assistance?

Steve_63 commented: I've seen my punters (via Ms Clarity) press on the Buy Now buttons and they just don't respond, there's no pointer/hand. +0
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

I already pointed that out to him via private chat the other day. Sorry for not repeating it here. I think he was ultimately able to get it to work a completely different way but we have to wait for him to update this thread to let us know.

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

I've never heard of Webs.com and, to be honest, this is a big ask because I actually haven't heard of any free web hosting companies in the past decade. Many, many, many years ago I started with Xoom, which was essentially a competitor to Geocities (and was also free). Of course, they're not around anymore either.

I did some Googling and came across Hostinger

Wix I believe used to also offer a free website builder, but I'm not sure if they still have free plans.

Good luck!!

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

The reason for using the other method is if the end-user is using a proxy server. The method you have in getUserIpAddr() is actually the more thorough way of getting a user's IP address. By any chance are you utilizing a proxy server?

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

I'm not spotting the difference between the two code blocks you have here other than, in the first one, you echo $country and in the second one you don't.

Also, in both of them you seem to have the line $user_r_ip = $_SERVER['REMOTE_ADDR']; but you are not using that variable anywhere. In both cases, the IP address passed into geoplugin.net is based on getUserIpAddr().

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

On line 145, you have <a href="complete.php?id=<?=$offerid?>"> I'm not seeing how $name is built into the URL (e.g. there's no reference to $adLink) but I am also not seeing in this code what you mean about how $name is being passed via Javascript.

Please show us the buggy code that included the $adLink because maybe there was a typo or something wrong with it.

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

Although I haven’t had a chance to test this for myself yet, I stumbled across someone mentioning that, as of MySQL 5.7, using the ALTER IGNORE method described above has been deprecated. You should still be able to use the INNER JOIN method, which is more robust anyways, as it gives you control over which of the duplicates to keep.

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

Do you have a WordPress site that perhaps someone else has gotten the admin password to? It sure sounds like your website has been hacked.

faithecommerce commented: How Can I secure? +0
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Google Analytics initially evolved from Google's purchase of Urchin Analytics, an Apache log analyzer. That's why legacy Google Analytics property IDs all begin with UA-. The familiar ?utm_ keywords that can be tacked onto URLs to track referrer statistics in Google Analytics are remnants of Urchin Tracking Modules.

All these years since Google initially purchased and overhauled Urchin, they built a from-scratch, much more robust analytics app, Google Analytics 4, also known as GA4. Much to the chagrin of every Google Analytics user everywhere, GA4 is not backwards compatible, incredibly confusing and bulky to use, and all users are being forced to upgrade by this July.

I completely get Google wanting to start over from scratch with something that's more robust and efficient. I really do get that. I also get that it's not practical to maintain both independent systems simultaneously. I get the need to migrate all users off of a legacy platform and onto the new platform. What I don't get, and what infuriates me to no end, is that Google can't figure out some way to import all of the data that its users have been collecting over the past nearly two decades into GA4.

So ends my rant.

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

"if 0 rows got affected, it means update WAS successful!"

That is correct. Suppose there is a MySQL query UPDATE users SET username="Dani" where id=5 and now also imagine there is no existing database record with id 5. The UPDATE query executed successfully, and 0 rows were affected.

mysqli_stmt_affected_rows() returns the number of rows affected by a successful query. It's quite possible for UPDATE queries to affect 0 rows, just as it's quite possible for a SELECT query to return 0 rows that match the constrains of the query. If the query didn't execute due to an error (e.g. the query was invalid, etc.) then it will return -1 instead.

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

According to PHP documentation the mysqli_stmt_execute() function returns false on failure.

Personally, I would just do something such as:

if (mysqli_stmt_execute($stmt) !== false)
{
    // Success
    ...
}
else
{
    // Failure
    ...
}
pritaeas commented: Agreed, but in the success part, depending on your business logic, I would still check affected rows +17
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Hi and welcome! Your name reminds me of Mark Twain. Is that your real name?!

twinmark01 commented: Call me Mark +0
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Good on you, Jim.

Philip, please don’t get discouraged from programming. Jim bashed your effort, yes, but in his next post he admitted that, even with a long career as a professional programmer, his suggestion still might not be perfect/fool-proof.

I just hope people stumbling across this thread don’t get the wrong impression that DaniWeb isn’t a safe space for new programmers, or that all skill levels don’t deserve to contribute. Even as a beginner, there is always something to teach the next person.

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

Philip,

Thank you for your contribution. I know it can be difficult coming into a new community and wanting to participate, especially as a beginner programmer. I apologize that your first impressions here have been people bashing your code. I do agree that the code you contributed is inefficient, but the better way to go about it would have to have suggested a better way so that you could learn instead of just being insulting. I would hope that DaniWeb would be about us sharing knowledge with each other, instead of bashing those who are brave enough to share their best.

Also, there is nothing wrong with resurrecting an old topic if you think you have something to add. The beauty of forums is that they live on for years and years.

I really wish I knew C++ enough to help Philip out here instead of just bashing him. Can someone help?

Much thanks!

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

Hello!

What does your Content Security Policy currently look like, and what type of PayPal integration do you have set up? Your CSP might be blocking PayPal's scripts from running or forms from executing.

Here at DaniWeb, we have some pages such as our DaniWeb Premium donation page where we have a PayPal form submission. Therefore, our content-security-policy has to look like this:

frame-ancestors 'none'; form-action 'self' https://www.paypal.com

In other words, we want DaniWeb pages to only be able to submit forms to daniweb.com domains or to PayPal.

Your CSP gets set up with an HTTP header. With PHP, I can do it as so:

header("content-security-policy: form-action 'self' https://www.paypal.com");
Steve_63 commented: Very helpful, the first person to come up with some kind of explanation and a solution, a big thank you! +0
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

As there is no edit option, I modified and posted it again with more clear accuracy.

In the future, you can click the little Pencil icon to edit your post up to 30 minutes after posting it, to correct typos and such. No editing is allowed after 30 minutes.

Also, for those who weren't reading carefully, note that becketharper585 corrected themselves in their repost and said that you can aim to target low-competitive keywords, not low-quality keywords, which is pretty good advice.

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

Back in the 1990s, GoTo.com would allow websites to add a little HTML snippet search box. We would get paid 2 cents each time someone performed a search from our site.

The ads may be relevant to the search, and they may even be the most relevant, but for all I know they may be there only because google was paid to put them there.

On the Google Ads side, you have to pass a series of quality and relevancy thresholds in order to pay for placement. And, even then, your ad doesn't show up if it doesn't consistently convert for web searchers (in terms of high click-thru rate, low bounce rate, etc.) If you stumble upon an ad that is not directly relevant, please click on the "Report ad" link.

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

But what is THE HACK that allowed you to win the most positions? ;)

Go viral in social media for an article that is listed in Google News.

Also, the first page for what? Your company name? I rank #1 for "DaniWeb". Does that count?

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

We don’t allow these kinds of topics because they turn into massive spam fests with everyone just posting a link to their blog.

I would check out the marketplace at BlackHatWorld. You could also do a Google search for “submit guest post”. But keep in mind that Google is seriously devaluing guest posting since the latest 2022 algorithm updates.

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

Are you referring to a constructor function that is used when creating new objects of a class? For example:

class User
{
    private $first_name;
    private $last_name;
    private $email;

    public function login() { ... }
    public function logout() { ... }

    public function __construct($data) {
        $this->first_name = $data['first_name'];
        $this->last_name = $data['last_name'];
        $this->email = $data['email'];
    }
}

$myUser = new User($data);
$myUser->login();
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Kind of makes it hard to form a correlation between the cause and the effect when the separation can be a year or more.

That's the point. Google doesn't want you to be able to game their algorithm. An entire multi-billion dollar industry (the SEO industry) was created to figure out ways to be able to still decipher actionable insights. 99% of SEO is data mining and interpreting analytical data to determine cause and effect.

Google supports this because it's not the case that you improve A, Google traffic increases, word gets out amongst the SEO community, and then every website knows to improve A. Instead, it's the case that the collective SEO industry deciphers their analytics to determine that many sites noticed improvements over the course of 2 years after improving A, B, C, D, and E over that period of time. Google knows that only A really was baked into their algorithm, but all 5 factors make for a more user-friendly webpage, and Google just tricked the collective web to be able to send Google searchers to websites that are 500% better instead of just 100% better. That, in a nutshell, is the relationship between the SEO industry and the Google Search Liaison team.

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

SEO is a long game. You might start seeing some movement in 3-6 months, but, depending on what it is you're doing, most of the SEO work you do won't really start making an impact for a year or more.

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

Secure it in what way? For the typical household, a password-protected router is just fine.

nancykhoo58 commented: Thanks! I got it. +0
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Right now my view is this is not a technical forum. It's a forum that is driven by SEO goals.

Why do those two things have to be mutually exclusive? Why can’t a company have a social mission and also have business goals? Why can’t a forum work to provide a service to its members but also work equally hard to hit financial milestones to pay its server costs?

Don’t complain about the problem without trying to be a part of the solution.

May I direct you to DaniWeb Premium where it states, “By upgrading to a DaniWeb Premium membership, you are directly contributing to our efforts to be more user-supported, and less reliant on income from advertising. Help us to focus less on ad sales and more on creating a better product for you, our members.” We make less than $100 a month from member contributions right now, and yet our server expenses exceed $4000 a month. 98% of our traffic comes from Google. How is complaining that we are driven by SEO goals helping to solve the problem? Or, if you simply feel it’s not your problem to solve, how is complaining about how I am trying to solve the problem at all productive?

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

You can always get a lapdog that is trained to pee indoors :)

rproffitt commented: I have a story about a staffer on our dev team. Let's just say, the lapdog did better. +0
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

The server has no concept of when the web browser is closed. However, PHP sessions are typically tracked with cookies, and you can set those cookies to expire when the browser window is closed. I believe PHP has its own session garbage collector that automatically deletes the files associated with old, expired sessions (based on the session.gc_maxlifetime setting).

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

I’m on my phone about to head to bed so I can’t really look into this too deeply tonight, but I would begin by echo’ing debug statements throughout requestHandler.php to see where the failure is happening.

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

Just following up. Did this work for you?

dot LI commented: Hi Dani - thansk so much for the follow up! Unfortunately neither worked. Did you have any other thoughts? Thanks Again! Jim +2
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

The latest Google algorithms have shifted off-site SEO away from guest blogs. Backlinks still matter, and that’s where I have my most difficult time, personally. Are you concerned more with on page or off page?

rproffitt commented: You should mention Google's war on AI generated content. +16
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

What else is there really to say?

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

What does your programming studio look like ? Curious to see all the mega hardwares. Do you mind attaching an image of your work room on your forum somewhere ? Maybe as a background image on your forum homepage ?

My office is really messy today, but I'll take a photo in the next couple of days and share it. I use a Macbook Pro M1 Max laptop hooked up to two LG monitors and a mechanical keyboard. I also have a third Dell monitor hooked up to a nearly ten year old Dell Workstation running Windows 10 (because it doesn't support Windows 11).

And how is the weather around you ? Able to take your dog/cat out or the weather too cold ?

I live in the San Francisco Bay Area, in California, aka "Silicon Valley". My husband works for Apple in Cupertino, not too far away from our home, and I work from my home office. The weather is pretty pleasant here compared to New York, where we are both from.

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

Google is working to block AI because not being able to at least somewhat accurately detect AI content is a direct threat to its algorithm. Yes, change happens. Like you, Google didn't think we'd get here that quickly though. They have been working on it for awhile but they haven't cracked it yet. They thought they had more time to solve the AI detection threat before it became this accessible to the masses. Now they're scrambling.

rproffitt commented: Spot on! +16
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Hi Jack! Happy new year!

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

While definitely a valuable SEO tool, I wouldn't exactly call Semrush a Google Analytics alternative. Especially for those looking for a simpler interface since Google Analytics 4 is being pushed on everyone.

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

The question here has nothing to do with PHP's explode() function. I can see exactly what is going wrong here for the OP.

You can see on lines 5 and 6 of the OP's code, they have the MySQL query:

SELECT * FROM kursus WHERE KodKursus NOT IN 
(SELECT kursusList FROM pensyarahkursus WHERE IDUser= '$value');

There's a subquery here. Basically what this subquery says to do is to select all of the items in the kursusList column of the pensyarahKursus table that match a specific IDUser. Then, once we have the list of all kursusLists, select all rows from the kursus table whose KodKursus column is not in the list.

Unfortunately, the reason the code doesn't work is because the kursusList column contains comma-delimited lists. As mentioned, the OP wants to "explode" these lists the way that one does in PHP with PHP's explode() function. Unfortunately, explode() does not have a MySQL equivalent. It is not ideal to store comma-delimited lists within a single MySQL column because they are not easy to work with or to search.

There is a MySQL function called FIND_IN_SET() that you may be able to use. For example, you can do something such as:

SELECT * FROM pensyarahKursus WHERE FIND_IN_SET('KK-2', kursusList)

and what that will do is find all rows that have KK-2 as an item in the kursusList column. Unfortunately, it will work very slowly because it will have to manually search all rows in the table (you can't use a MySQL index in …

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

The salt is encoded inside the hashed password.

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

Strange! How so ?
Both files are on the same directory. The page that has the iFrame and the page that is the src of the iFrame.
This beats me! Puzzling!

This is happening because the <iframe> tag can only have one sandbox attribute. When you have two sandbox attributes, the one appearing first in the code overwrites any later ones, to the best of my knowledge. Either way, it's invalid HTML, so I can't speak for what unexpected behavior you may encounter.

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

The string seems to already be some sort of encrypted data. But what language are you looking to use?

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

Unfortunately I don’t know of any, and DaniWeb isn’t really designed to be a marketplace or allow such solicitations.

However, as a general rule of thumb, I would avoid contracting agencies for large, enterprise-scale products. Agencies are typically designed to handle one-off projects that are a scope of one week to a few months in length. If you need long term maintenance of your project, I would hire one or two people in-house.