I'm trying to make this Joomla Update system work for paid extensions, but I'm stuck now.
How I'm going about it is as follows:
- I'm using Mohameds downloadid.php to populate "extra_query" field in the "_update_sites" table. -- this works fine and field is like this "dlid=345235423542354dgfdfgh5674n6"
- I have download.php file at my end that should do the following: GET the variable "dlid" from the url, check it against my database/subscription system and return the file or not
I have yet to build the checking queries, but for now, I'm stuck at getting the variable "dlid". This is how I've understood it should work:
after you check for updates joomla looks into your xml file and checks for new versions
then after it sees a new update is available and you click on update
it follows the link in the xml updateserver file adding "?dlid=35423542354" at the end of it (right?)
This is where it fails for me, I can see that download.php is being accessed but no "dlid" value is passed I have set it up to write values into a file like this:
<?php $file="log.txt"; $dlid= $_GET['dlid']; $dlid.= "\r\n"; file_put_contents($file, $dlid, FILE_APPEND | LOCK_EX); echo 'done' . PHP_EOL;
If I use the link and add "?dlid=234234" at the end of it manually it gets written into a file with no problems.
How can I check if Joomla is sending the "dlid" variables?