Current time: 03-31-2025, 10:25 PM Hello There, Guest! (LoginRegister)


Thread Closed 
[RÉSOLU/RESOLVED] Connexion depuis un site distant
Author Message
Athar Offline
Junior Member
*

Posts: 71
Joined: Sep 2009
Reputation: 0
Post: #1
[RÉSOLU/RESOLVED] Connexion depuis un site distant
Bonjour,

Je reviens vers vous pour vous posez une question:
Comment modifié le code suivant pour pouvoir ce connecter depuis un site extérieur?

Code:
if ($checkReferer) {
        if (isset($_SERVER['HTTP_REFERER']) && !empty($_SERVER['HTTP_REFERER'])) {

            $info = parse_url($_SERVER['HTTP_REFERER']);
            if (isset($info['host']) && !empty($info['host'])) {
                if ($info['host'] != $_SERVER['HTTP_HOST'] || $info['host'] != $_SERVER['SERVER_NAME']) {
                    set_page_message(tr('Request from foreign host was blocked!'));
                if(!(substr($_SERVER['SCRIPT_FILENAME'], (int)-strlen($_SERVER['REDIRECT_URL']), strlen($_SERVER['REDIRECT_URL'])) === $_SERVER['REDIRECT_UR$
                    redirect_to_level_page();

Certes, on peut mettre le checkReferer a false, et la sa fonctionne, mais cela marche pour n'importe quel site externe...

Donc comment ajouter une exception pour un site?

Concrètement, je souhaite pouvoir me connecter depuis un site "http://www.SitePrincipal.com" mais aussi depuis "http://admin.webserv.SitePrincipal.com" qui est la page par défaut d'ISPcp.

Merci.
(This post was last modified: 11-18-2009 11:36 AM by Athar.)
11-07-2009 05:25 AM
Visit this user's website Find all posts by this user
Thread Closed 


Messages In This Thread
[RÉSOLU/RESOLVED] Connexion depuis un site distant - Athar - 11-07-2009 05:25 AM
RE: Connexion depuis un site distant - Nuxwin - 11-18-2009, 10:28 AM
RE: Connexion depuis un site distant - Nuxwin - 11-18-2009, 11:37 AM
RE: Connexion depuis un site distant - Nuxwin - 11-18-2009, 11:44 AM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)