How to fool Microsoft's JavaScript detection?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
tomfra
Forum Contributor
Posts: 126
Joined: Wed Jun 23, 2004 12:56 pm
Location: Prague, Czech Republic

How to fool Microsoft's JavaScript detection?

Post 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
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post 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 ;)
tomfra
Forum Contributor
Posts: 126
Joined: Wed Jun 23, 2004 12:56 pm
Location: Prague, Czech Republic

Post 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
Post Reply