Community Support Forums — WordPress® ( Users Helping Users ) — 2011-12-28T05:58:34-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=16561 2011-12-28T05:58:34-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16561&p=59004#p59004 <![CDATA[Re: retrieving file request from URL with $_GET]]>
Code:
$filename= str_replace('http://stonecoldcnc.com?s2member_file_download=', '', $url); 


I hope that helps.

Statistics: Posted by Cristián Lávaque — December 28th, 2011, 5:58 am


]]>
2011-12-27T07:54:30-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16561&p=58917#p58917 <![CDATA[Re: retrieving file request from URL with $_GET]]> perhaps I wasn't clear enough, I do not want to use the s2member variables in another Wordpress installation, I want to use them in a plugin which is installed in my Wordpress installation.

The URL to retrieve the filename from looks like that:
http://stonecoldcnc.com?s2member_file_download=Abey-CR540.dxf

As I said before, the code I've posted above your post is working fine if copied into a post/page but not in another php file which is a simple welcome email plugin. I just need to get the filename from the URL so I can send it with the welcome email.

Statistics: Posted by stonecoldcnc — December 27th, 2011, 7:54 am


]]>
2011-12-27T06:17:58-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16561&p=58904#p58904 <![CDATA[Re: retrieving file request from URL with $_GET]]>
What is the URL of your s2Member installation and what is the URL of the page where you're trying to use this variable?

Thanks!

Statistics: Posted by Cristián Lávaque — December 27th, 2011, 6:17 am


]]>
2011-12-26T23:29:57-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16561&p=58879#p58879 <![CDATA[retrieving file request from URL with $_GET]]>

Code:
<?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.

Statistics: Posted by stonecoldcnc — December 26th, 2011, 11:29 pm


]]>