Php shadow登录论坛并将数据返回给iframe

时间:2015-07-29 13:22:41

标签: php html

我有一个页面登录论坛

<a href="https://www.Forum1.com/en/login" target="myiframe">Forum1</a> &nbsp;
<a href="http://Forum2.be/Login.aspx" target="myiframe">Forum2</a> &nbsp;
<a href="https://Forum3.forum.com/desktop/" target="myiframe">Forum3</a>
</br>
<iframe width="100%" height="100%" name="myiframe"></iframe>
<p><a href="?action=logOut">LogOut</a></p>

我在每个人都有注册凭据,我有5个人想要使用我的凭据阅读此论坛,我不想向他们展示凭据但我想让我们用我的凭据阅读论坛。因此,在我的页面上,在ifref中按下iframe必须加载每个论坛的内容已经有我的凭据(必须不向用户显示)(所以我不担心他们可以更改我的个人资料中的任何信息或其他内容)。此外,我需要跟踪乳清在论坛上做什么,以控制谁可以做什么(这样的事情链接被按下)。

可以用PHP吗?请告诉我正确的方向来解决这个问题。

1 个答案:

答案 0 :(得分:1)

我想让这些用户注册自己的帐户会更容易。

如果您仍想使用PHP代码让这些用户在不知道您的凭据的情况下查看论坛,您可以创建一个这样的PHP类:

<?php
    class Forum
    {
        var $url = '';

        public function getContent()
        {
            $content = @file_get_contents($this->url);
            return $content;
        }
    }
?>

为您想要展示的每个论坛创建对象。

<?php
    require_once('Forum.php');
    $getForum = new Forum();
    $getForum->url = 'http://www.google.de';
    echo $getForum->getContent();
?>

这只是一个例子,您必须添加凭据,并可能使用http://php.net/manual/en/book.curl.php登录论坛。