如何将我的 BlogSpot 页面拉入我网站上的页面

发布于 2024-08-01 20:51:44 字数 926 浏览 2 评论 0原文

我在 BlogSpot.com 上有一个博客,并且有一个基于我自己名字的域名。 我想在我的网站上有一个网址(例如 http://www.mydomain.com/blog ),然后将从我的博客页面提取内容,但我希望地址栏中的 URL 保留在 http ://www.mydomain.com/blog,这样看起来您就不会离开我的网站。

(我在 1and1.com 上有一个 Windows 托管帐户)

我用 Google 搜索了这个问题,我发现了一些事情,例如:

1:添加一个标签到“刷新”。 尝试过这个,但它改变了地址栏。

<meta http-equiv="refresh" content="0; URL=http://myblog.blogspot.com" />

2:我还了解了html iframe的事情,但是它有高度和滚动条问题。

3:然后,我找到了这个部分代码片段,但我不知道如何处理它,或者它是否可以在 BlogSpot 服务器上工作,或者在我的服务器上工作:

<%
Set objHTTP = Server.CreateObject("Microsoft.XMLHTTP")
objHTTP.Open "GET", "http://myblog.blogspot.com", false
objHTTP.Send
Response.Write objHTTP.ResponseText
%>

我是一个客户端应用程序人员,所以这个网络东西对我来说都是新的。

任何帮助将不胜感激。

I have a blog on BlogSpot.com, and I have a domain based on my own name. I want to have a URL on my site (like http://www.mydomain.com/blog) that will then pull in the content from my blog page, but I want the URL in the address bar to stay on http://www.mydomain.com/blog, so that it does not look like you left my site.

(I have a Windows hosting account on 1and1.com)

I did Google this question, and I found how a few things, like:

1: Adding a tag in to "refresh". Tried this, but it changes the address bar.

<meta http-equiv="refresh" content="0; URL=http://myblog.blogspot.com" />

2: I also learned about the html iframe thing, but it has height and scrollbar issues.

3: Then, I found this partial code snippet, but I don't know what to do with it, or if it will even work against the BlogSpot server, or on my server:

<%
Set objHTTP = Server.CreateObject("Microsoft.XMLHTTP")
objHTTP.Open "GET", "http://myblog.blogspot.com", false
objHTTP.Send
Response.Write objHTTP.ResponseText
%>

I am a client app guy, so this web stuff is all new to me.

Any help will be greatly appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

暖风昔人 2024-08-08 20:51:44

第三个选项可能适用于初始页面加载,但页面上的任何链接都会将用户引导至 BlogSpot 页面,并更改 url。 它只是从 blogspot 获取页面,然后将其发送给用户而不进行任何更改。

对我来说,更改 url 并不是什么大问题,只要用户能够轻松地从一个网址转到另一个网址即可; 任一页面上都有显着的链接,告诉用户他们要去哪里。 大多数人并不关心网址,他们只关心内容。

使用 IFrame 可能是您最好的选择。 许多 Facebook 应用程序都在 IFrame 中,并且仍然集成得很好。

The third option will probably work for the initial page load, but any links on the page will then direct the user to the BlogSpot page, and change the url. It simply fetches the page from blogspot, and then sends it to the user without any changes.

For me, the changing url is not a big deal, as long as it's easy for the user to get from one to the other easily; have prominent links on either page that tell the user where they go. Most people don't care about the url, they just care about the content.

Using an IFrame is probably your best bet. Many Facebook applications are in IFrames and still integrate very well.

雨落星ぅ辰 2024-08-08 20:51:44

我认为使用常规框架或 iFrame 可能是最简单的解决方案。 您遇到过什么样的滚动条问题? 您可以为其中一些属性设置自定义值,只需查看此处的文档:

http:// www.w3schools.com/TAGS/tag_iframe.asp

如果您不想使用框架,实际上可以使用服务器端应用程序(例如 Squid。 然而,这设置起来比较困难,需要能够在主机上安装软件和配置防火墙/iptable 设置,并且必须正确配置以防止恶意滥用。

-标记

I think using a regular frame or an iFrame is probably the easiest solution. What kind of scrollbar issues did you encounter? You can set custom values for some of these attributes, just check out the documentation here:

http://www.w3schools.com/TAGS/tag_iframe.asp

If you didn't want to use frames, you could actually proxy the entire page using a server side application like Squid. However, this is more difficult to setup, requires the ability to install software and configure firewall/iptable settings on your host, and must be configured properly to prevent malicious abuse.

-Mark

乄_柒ぐ汐 2024-08-08 20:51:44

您可以尝试以下一些选项:

如果您安装了 PHP:

<?php
    echo file_get_contents('http://myblog.blogspot.com'); // or you can use fopen()
?>

或安装了服务器端包含:

<!--# include virtual="http://myblog.blogspot.com" -->

Here are some options you can try:

If you have PHP installed:

<?php
    echo file_get_contents('http://myblog.blogspot.com'); // or you can use fopen()
?>

Or Server-Side-Includes installed:

<!--# include virtual="http://myblog.blogspot.com" -->
妄司 2024-08-08 20:51:44

您还可以使用 Blogger 数据 API

这样做的优点是您可以重新格式化和重新组织内容以匹配您网站的风格。 缺点是它比 iframe 需要更多工作,并且您可能无法匹配 Blogspot 的全部功能。

我现在正在研究这个,看看是否可以使用 Blogspot 作为俱乐部新闻系统的 CMS。

You can also pull blog content from Blogspot using the Blogger Data API.

The advantage of this is that you can reformat and reorganize the content to match the style of your website. The disadvantage is that it's more work than an iframe, and you probably won't match the full functionality of Blogspot.

I'm playing with this now to see whether I can use Blogspot as a type of CMS for a club news system.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文