Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

156
Visualizações
Web Push Panel Post URL Redirection

I do not know much about coding, but recently I got a self-hosted web-push panel made for my website by a developer, he also gave a plugin for my WordPress website. The admin panel works fine, there is something wrong with it, maybe he didn't fix it on purpose

Like when I send a notification of a post from my WordPress website, the notification goes but when the subscriber clicks on that post, it gets redirected to a different URL when I checked the files of the panel, I found a file called link.php

There is a code in that file in which that Redirect URL is set as if I set that URL to google.com, then after clicking on my post, the user landed on google.com and not on my post and the developer did the same With many things, I was given a script like unlimited subscribers, but the notification goes to only 10k people.

Now I am not having any contact with that developer so how can I fix this redirection problem please give any suggestion

link.php code

<?php

const BASE_PATH = __DIR__;
require_once BASE_PATH.'/system/init.php';

$linkId = (isset($_GET['linkId']) && !empty(trim($_GET['linkId'])))? SQLSecure(base64_decode($_GET['linkId'])) : '0';

$linkQuery = $DB->query("SELECT * FROM `links` WHERE `id`='{$linkId}'");
if($linkQuery->num_rows > 0){
    $LinkData = $linkQuery->fetch_assoc();
    $DB->query("UPDATE `links` SET `clicks`=`clicks`+1 WHERE `id` = '{$LinkData['id']}'");
    redirect($LinkData['full_link']);
}
redirect('https://google.com');

?> 

the other file code, mentioned in the link.php file system/init.php

<?php

ini_set('max_execution_time', 0);
ini_set('session.cookie_httponly',1);
ini_set('session.use_only_cookies',1);
ini_set('session.cookie_secure', 1);
ini_set('session.cookie_samesite', 'Strict');
session_start();

require_once BASE_PATH.'/config.php';
require_once __DIR__.'/core/database.php';
require_once __DIR__.'/core/functions.php';
require_once __DIR__.'/core/app-start.php';  
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

This redirect function first finds the previously generated ID in the database. If the ID is found, the link will be taken and redirected to. If not, I will switch back to google. In case your ID does not exist in the database, it should be transferred to google. It seems that the code has an error in the function of inserting ID and URL into the database.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda