Skip to content

Why does Symfony ask a valid token when I start a local server?

I have a symfony 5.1 application under development on my laptop. This command failed: Your token has been revoked, please login again Then, the prompt purposes me to login, but I cannot always login, because I’m behind a firewall that rejects external access for some security reasons. I tried : to unins…

Weird array structure in preg_match_all output PHP

I have pregmatch_all function that scrapes emails ! But the output is kind of weirdly structured and I don’t manage to restructure it. returns Two things please: How can I get rid of the “com” array ? How can I restructure the array in order to get : Array ( [0] => hello@soshape.com ) Any…

PHP longhand hex to RGB not working correctly

How do I convert longhand hex to RGB(A)? For example, I have the following code to convert all formats of hex, colorname, etc.. to RGBA for background opacity, but for some reason longhand hex does not work, but instead takes the shorthand from the longhand (eg. background-color: #0000ff; becomes background-c…

How can I get post id from url?

blog.php URL: I want to get post_id from url. But I don’t know how? I will be glad if you can help me. read.php Answer I can advice next solution: