php extract origin from url code example
Example 1: part of url php
//https://www.google.com/search?key=1234
$url = $_SERVER['REQUEST_URI'];
$url_components = parse_url($url);
parse_str($url_components['query'], $params);
$key = $params['key'];
// key=1234
Example 2: how to fetch data from url in php properly
use <?php $_SERVER['REQUEST_URI'] ?> in action"" to get the data properly