A
A
Andrei St2017-01-08 20:58:40
WordPress
Andrei St, 2017-01-08 20:58:40

How to make a download link in wp?

I saw on many sites that when you click on the download link, a timer is triggered after which the download link is available, or the link will be available after a person shares a post on a social network, how to organize this on Wordpress, can anyone suggest a plugin?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
X
xFreake, 2017-01-19
@xFreake

<a download>Ссылка</a>

U
ugodrus, 2017-06-24
@ugodrus

Nothing surprising. You are passing the variable via GET key=1
Inside PHP $_SERVER['REQUEST_URI'] = /login/?key=1
Further down the code

$page = 'login/?key=1'; 
if (file_exists("all/login/?key=1.php")) 
  include "all/login/?key=1.php"; 
  else if ($_SESSION['logged_user'] and file_exists("auth/login/?key=1.php"))
  include "auth/login/?key=1.php";
  else if (!$_SESSION['logged_user'] and file_exists("guest/login/?key=1.php"))
  include "guest/login/?key=1.php";
  else
  header('Location: /404');

I don't think that you have a ?key=1.php file in auth/login/
I don't know since when you have such a dense construction. I haven't practiced and haven't met such gorodulins since the funeral of 4.3.
There is only one verdict - either select another variable with the correct value of $page. Or clean this one. Removing unnecessary and analyzing whether the value is suitable after filtering.

A
Alexander Shapoval, 2017-06-24
@sanek_os9

PHP Start | Practice: Lesson 1. Implementing MVC
https://www.youtube.com/watch?v=ba3M3_Myrqg&index=...
they will tell you and show you how to implement what you want

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question