PASTE
PASTE copied to clipboard
I wanna add random url feature
is there any way to add random url in this script just like pastebin
Sure you can grab random results from the database, you can even make MySQL do it for you, for instance;
SELECT p.* FROM pastes AS p, (SELECT ROUND(RAND() * (SELECT MAX(id) FROM pastes)) AS id) AS x WHERE p.id >= x.id LIMIT 1;
That implementation could probably be something like this;
$query = 'SELECT p.* FROM pastes AS p, (SELECT ROUND(RAND() * (SELECT MAX(id) FROM pastes)) AS id) AS x WHERE p.id >= x.id LIMIT 1';
$result = mysqli_query($con, $query);
$row = mysqli_fetch_assoc($result);
Is there any possibility add an option in configuration admin panel ? and could you please give more detail which php file need modify for random url creation ? @thinkverse
any update or news ?
any update or news ? I need it
Would be handy yes
look at this solution, it works for me https://github.com/jordansamuel/PASTE/issues/36