php - find all get parameters and current url -


this question has answer here:

how find current url , of paramaters in url php? want track paramaters being passed current url. if give me php command this, great! thanks! here code:

<?php  $filedir = './';  $filename = $_get['file']; //security check if(strpos(realpath($filename), path_to_valid_mp3s) !== 0) { die('bad path!'); }  $path = $filedir . $filename;  if (!is_file($path) or connection_status() != 0) {     exit(); }  ob_end_clean();  header('cache-control: no-store, no-cache, must-revalidate'); header('cache-control: post-check=0, pre-check=0', false); header('pragma: no-cache'); header('expires: '. gmdate('d, d m y h:i:s', mktime(date('h')+2, date('i'), date('s'), date('m'), date('d'), date('y'))).' gmt'); header('last-modified: '. gmdate('d, d m y h:i:s').' gmt'); header('content-type: application/octet-stream'); header('content-length: '. @filesize($path)); header('content-disposition: attachment; filename="'. $filename .'"'); header('content-transfer-encoding: binary');  if ($file = @fopen($path, 'rb')) {     while (!feof($file) , connection_status() == 0) {     echo fread($file, 1024 * 8); }  flush(); }  @fclose($file); ?> 

there global variable present contains variables.

$_get 

http://php.net/manual/en/reserved.variables.get.php

an alternative $_request global.

http://php.net/manual/en/reserved.variables.request.php

an associative array default contains contents of $_get, $_post , $_cookie.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -