10000 forum users celebration - special event

Alright. This is unrelated, but I need help with it, I have spend the last hour since my post trying to figure it out without success.

A response that I get from an API is

{"errors":[{"status":"422","code":"validation_error","detail":"Error 5301","source":{"pointer":"\/data\/attributes\/error"}}]}

I need to get the Error 5301 (So “detail”) into its own variable.

I tried json_decode, json_encode(json_decode($string),true), and everything else I could think of an all I get are errors.


There is probably a really simple anwser to this, right?

3 Likes

Wait, why are you decoding a JSON object and then encoding it again? Additionally, json_encode does not take two parameters, it takes one. I think you’re confused with json_decode, which can take two parameters. And yes, there is a difference between json_decode($str) and json_decode($str, true).

2 Likes

Maybe that is why it failed…

EDIT: Flipping it does not work though.

Well, what I’m still confused about is why are you decoding and encoding again.

Let me give you an example with this JSON object.

$json = '
{
  "key1": "value1",
  "key2": "value2",
  "obj1": {
    "obj_key1": "obj_value1",
    "obj_key2": "obj_value2"
  }
}
';
$json_obj = json_decode($json, true);

This will turn $json into an array that we can access anytime. Let’s say we want to get the value of key_2 – we can achieve that by using $json_obj["key_2"], which will output value_2. If we want to access the obj1’s keys we can do that by using $json_obj["obj1"]["obj_key1"].

7 Likes

Ok, I don’t know what I did wrong, but thank you so much, its working now!

4 Likes

If the code works but you don’t know why, don’t touch it.

6 Likes

I find it so hard to believe that I signed up in 2018, and that my forum account is newer than @MAHOfficial’s, who I believed join from Byet. I thought I was gen2017 for some reason lol. I also find my first posts unlikely to have been my first posts… :joy:

Welcome to the MOFH community! Feel free to drop around their forum. We’ll try our best not to bite.

Come on, where’s the fun in that?

I hate this so much, yet it’s the one principle in programming that cannot be defeated. Maybe one day we’ll be able to surpass this limit :sob:


On an unrelated note, had a weird Google glitch that showed the normal results for my username as normal, while when putting “infinityfree” next to it I’d get the NSFW warning. I’m curious as to what content that would be :eyes:


3 Likes

:zipper_mouth_face:

Naughty, naughty! (Although I guess that means that me and Oxy are not doing our jobs properly…)

5 Likes

Just started, and a ton of things are confusing already. Any place I can find tutorials on how to set up Xera, etc?

4 Likes

Xera is no longer maintained, MOFHY-R is the new one. But nobody knows if there are vulnerabilities or major bugs with it yet (It seems to have less features though).

Personally, I would start building your own system. If you want, I can let you into by BETA test for my software, and I will be happy to answer your questions! (PM me)

Or, use Xera as a starting base and built off of it (As long as you know Codinger)

5 Likes

Several different domains are mentioned in the SERP
and maybe one of them is the cause of the warning (byet, profre…etc.).

I tried to isolate only infinityfree.net and got no warning !
try putting this in search chrispar site:infinityfree.net

7 Likes

Of course!
Xera’s setup instructions and docs are at its own forum, https://fourm.xera.eu.org/. They might be a bit confusing, so feel free to ask anything at either the community forum or even better, the unofficial Discord, and someone will direct you to the right place. Follow the instructions in the GitHub and try to experiment in a localhost environment to get to know it, or directly at your host, whichever you prefer.

As @Greenreader9 mentioned, Xera is no longer supported and the same author has released MOFH-R (not MOFHY, this is important, don’t download anything MOFHY unless you wish to get your data leaked).
It’s under development and the instructions are also on its own forum, https://nxvim.freeflarum.com/. I haven’t experimented much with it, unlike Xera.

*CodeIgniter, lol.

I’m in both the Byet and PFH communities… had no idea any of them was NSFW :flushed:


Am I getting fired? :stuck_out_tongue:

5 Likes

Maybe not you specifically, but others on that dead discord server that is supposed to be active probably will be. Seems maybe I won’t have to give out as many Gift Cards as I originally planned!

3 Likes

I mentioned it only for the sake of example
to see that the word “infinityfree” does not only mean this domain.

btw. This is the reason

Summary

6 Likes

I just realized that so many people here are probably confused about my last post :joy:

5 Likes

What are the odds both “infinity free” and “chris par” are in a NFSW website and a web hosting service?

5 Likes

@Greenreader9 correct me if I’m wrong I haven’t been here for a while, but after I saw your post I noticed this as well:


Source: Getting SSL certificates from sslforfree.com or zerossl.com

Is it outdated or am I missing something?

5 Likes

Basically, if you get the certificate from a third party site (not the client area), it was not able to work with the vp.

3 Likes

Yeah, it’s outdated.

When the article was written, both sites were just web frontends around Let’s Encrypt. Let’s Encrypt supports HTTP validation or DNS TXT validation, and none of those work with free hosting (without using additional tools, anyways).

Then, ZeroSSL became a Sectigo partner, which game them access to other verification methods, including CNAME, and they bought sslforfree.com so it’s just another domain that uses ZeroSSL’s systems.

So both providers (since they are the same) can be used now with CNAME verification, so the article is no longer relevant.

I can’t for the life of me imagine why you’d want to though. ZeroSSL limits you to three free certificates, which we don’t, and with our panel you can have us set up the CNAME records and SSL certificate automatically.

So in short: the article is no longer relevant, and it should be gone now.

7 Likes