dimanche 14 mars 2021

show page break only if visitor came from twiter?

**hello I want to show page break based on referrer domain ( Twitter or Reddit ) ** if visitors came from Twitter will see a paginated post if the condition doesn't meet will see a normal long post " not split with page break "

image twitter user

image google user

    <?php

    $ref = $_SERVER['HTTP_REFERER'];
    if (preg_match("(twiter)", $ref) != false) {
        echo <<<END
 <!--nextpage--> ?????
END;
    }
    else {
        echo "";
    }

?>

Aucun commentaire:

Enregistrer un commentaire