Need php script just like used by mysmartprice dot com on Go To Store button (URL Cloaking) [closed]

StackOverflow https://stackoverflow.com/questions/13550395

  •  02-12-2021
  •  | 
  •  

Вопрос

Need code of php script used for example by mysmartprice dot com on their "Go To Store" button for URL cloaking.

Это было полезно?

Решение

I'm not 100% sure if I got your question right, but this is my guess of you mean:

Use PHP's header method like this:

<?php
    if(!isset($_GET["p"]))
        exit("No parameter \"p\"");

    $p = $_GET["p"];
    header("LOCATION: $p");
?>

Save the file as redir.php and then use it as http://mysite.com/redir.php?p=http://google.com/.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top