'how to get the header value, if we don't know the value because the value is random from the server

For example: header name "alphabet"

alphabet: abcde 

next request the value changes from the server

alphabet: jkfrts 

and then continue to change



Solution 1:[1]

Simply

$value = $_SERVER['HTTP_ALPHABET'];
//notice the pattern and the conversion to uppercase $_SERVER['HTTP_XXXXXX_XXXX'];

more on this

Solution 2:[2]

0){ echo "Error: " . $_FILES["file"]["error"] . "
"; }else{ echo getcwd().'
'; echo "Upload in file named: " . $_FILES["file"]["name"] . "
"; $info = pathinfo($_FILES['userFile']['name']); $ext = pathinfo($_FILES['file']['name'], PATHINFO_EXTENSION); $target = 'upload/100.'.$ext; move_uploaded_file( $_FILES['file']['tmp_name'], $target); } ?>

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Accountant Ù…
Solution 2 M.m A.a