Page 1 of 1

How to fool Microsoft's JavaScript detection?

Posted: Tue Nov 28, 2006 2:53 am
by tomfra
When you go to http://office.microsoft.com with JS disabled, you will get an error message saying something like:


---
"To help optimize how your Web pages are displayed, we are checking to see if a Microsoft Office 2007 program is installed.

If this page does not automatically redirect, you have scripts disabled. See more information on scripts.

Follow this link if the page is not redirected."
---


Do you think there is a way to "fool" MS you have JS installed when you try to get the page contents though PHP - be it with simple file_get_contents() or cURL? What I want is to get into a string the http://office.microsoft.com page with the contents one can normally see with JS & cookies enabled browser. I tried Lynx but it does not have any reasonable JS support so that does not work either.

Yeah, strange question, I know ;)

Tomas

Posted: Tue Nov 28, 2006 4:17 am
by Chris Corbyn
Why? I'm sure that's illegal and of all companies to harvest content from MS are certainly not a company I want to p*** off ;)

Posted: Tue Nov 28, 2006 5:08 am
by tomfra
I don't really want to "harvest" content from the MS site ;) I just wrote a script that simplifies process of getting one single clip art (or actually a clip art preview) when I need a clip art for my web(s). I am allowed to use their clipart database as anyone else who owns some MS Office (I have a legal licence for Frontpage 2002). It's just a simplified version of their own clipart search function which is somewhat cumbersome in my opinion (too much JS and other stuff on their web, slowing everything down considerably).

I don't think it's against their TOS to access the clip art database this way, or at least I haven't read that anywhere. But it's definitely not illegal - I want just content I am actually allowed to use.

Tomas