Skip to content
Advertisement

How to enforce a http 403 or 404?

Is it possible to kind of force a 403 or 404 error? I have a kind of admin page, where I am trying to prevent hackers from getting into my filesystem on my server. (the path get’s delivered over the …

How to insert element into arrays at specific position?

Let’s imagine that we have two arrays: $array_1 = array( ‘0’ => ‘zero’, ‘1’ => ‘one’, ‘2’ => ‘two’, ‘3’ => ‘three’, ); $array_2 = array( ‘zero’ => ‘0’, ‘one’ => ‘1’, …

Replacing a specific part of a query string PHP

I use $_SERVER[‘QUERY_STRING’] to get the query sting. A example would be a=123&b=456&c=789 How could I remove the b value from the query string to obtain a=123&c=789 where b can be any value of any length and is alpha numeric. Any ideas appreciated, thanks. Answer The value is going to be $_GET[‘b’]. How about: