retrieving file request from URL with $_GET

I'm trying to use the requested file name from the URL in another pluging. The code below works fine if I drop it into a new page BUT it does not work if I use it in another plugin. The variable $file_download_req is always = "!!! no filename !!!".
The URL to retrieve the filename from looks like that (...?_s2member_seeking[type]=file&_s2member_seeking[file]=TestFile-CRRR540.dxf....)
All I need is to get the filename TestFile-CRRR540.dxf from the URL for further use in the other plugin.
Any help or hint would be greatly appreciated.
- Code: Select all
<?php
$_g = stripslashes_deep ($_GET);
if (isset ($_g["_s2member_seeking"]["file"])) {
$file_download_req = esc_html ($_g["_s2member_seeking"]["file"]);
} else {
$file_download_req = ' !!! no filename !!! ';
}
echo 'file= ' . $file_download_req;
?>
The URL to retrieve the filename from looks like that (...?_s2member_seeking[type]=file&_s2member_seeking[file]=TestFile-CRRR540.dxf....)
All I need is to get the filename TestFile-CRRR540.dxf from the URL for further use in the other plugin.
Any help or hint would be greatly appreciated.