开发者

Faking website integration

I am working on a prototype for a project that is somewhat similar to the facebook's "like" button. Basically it's an embeddable piece of code that can integrated with any website.

I am looking for a way to fake this integration for a demo. Basically I want to show a familiar web page (like http://www.cnn.com) with my code already embedded. Since I obviously can't do the actual integration right now, I need some way of faking it.

The only thing I can think about is to use http://www.httrack.com/ to download the page I want, and then change it locally. The problem with this is that it is clear开发者_Go百科 that the page is hosted locally and not on www.cnn.com.

Is there a better technique for doing this?


If you use Firefox browser, you can use Greasemoneky and with JavaScripts, embedd your content inside that page. You can eaven add events, that will open some popup windows, etc. to show action of such a script.

That is easy approach, there are ton's of examples in their forum, and good documentation, how to use it.


You can write your own userscript (i.e. greasemonkey) to modify the page on the fly.


Even though I think it's a bad idea to do this (not sure if stackoverflow allows to ask such questions), but what you can do is edit the hosts file (if you're on windows) and add a line

127.0.0.1 www.cnn.com

it means that when you visit the website cnn it will display the domain name in the browser but it will use your localhost server to display the content.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜