dpno17028 2013-10-29 11:37
浏览 57
已采纳

从不同的网站登录,通过URL传递参数

I have question about log-in from different Website.

Is it possible that a user can login from Website A to Website B by passing parameter (username and password) trough URL?

For example, I have login Form (contain username and password field) in Website A, than when user click submit, parameter will pass trough URL, and redirect to Website B (already login)

I have seen an article that allow it, something like

http://mydomain.com/login.php?username=iqbal&password=12345

but i don't know how to use it. Is it safe to use?

  • 写回答

2条回答 默认 最新

  • douliao5467 2013-10-29 12:43
    关注

    as per: Allow php sessions to carry over to subdomains

    Here are 3 options.

    Place this in your php.ini:

    session.cookie_domain = ".example.com"
    

    In your .htaccess:

    php_value session.cookie_domain .example.com
    

    As the first thing in your script:

    ini_set('session.cookie_domain', '.example.com' );
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 stm32开发clion时遇到的编译问题
  • ¥15 lna设计 源简并电感型共源放大器