PHP Browser environment

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
nomis_uk
Forum Newbie
Posts: 7
Joined: Thu Feb 24, 2005 7:34 am

PHP Browser environment

Post by nomis_uk »

Hi, I'm attempting to create a browser environment by stripping the tool bars out of a browser and use a frameset to have seperate frames for the browser icons and one for the web site the user is visiting.

Is there a way to stop web sites, that open links in new windows or sites that use pop-ups, escaping my browser?

Any suggestions would be helpful.
User avatar
CoderGoblin
DevNet Resident
Posts: 1425
Joined: Tue Mar 16, 2004 10:03 am
Location: Aachen, Germany

Post by CoderGoblin »

You might be able to do some things with Javascript BUT this is easy to switch off.

Restricting usage is not normally advisable. What happens if they do not like your "browser" and wish to use the default ? Most users are familiar with the browser they use, why should they have to learn a "new" one. In this instance I would probably leave the site and never go back.[/b]
nomis_uk
Forum Newbie
Posts: 7
Joined: Thu Feb 24, 2005 7:34 am

Post by nomis_uk »

Sorry, i didnt fully explain myself. Im a student, as part of my coursework Im making a web browser with simplified AI by making the browser search google via its google's API, as well as search RSS feeds.

But because of timescale, writting a browser from scratch is unrealistic so I need it to work ontop of an existing browser engine, so thats why I thought of stripping tool bars etc. This isn't about restricting usage, its about making a simulation of a browser. I dont really want to prevent things opening in new windows, but i want to be able to detect when this does happen and make sure it opens within the frameset to keep the browser appearence.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

you could make your own extension/modification of Firefox/Mozilla, not too far fetched..

detecting whether something will open in a new windows is a bit tricky.. depending on the savvy of the writer. Regular expressions would be the usual solution, however there are many ways to 'hide' from simple regular expressions, so you will need to scrutinize the page code with your parser... Personally, that's too much work for little benefit, I'd just tweak Firefox :)
nomis_uk
Forum Newbie
Posts: 7
Joined: Thu Feb 24, 2005 7:34 am

Post by nomis_uk »

or is there a way, with javascript i guess, to iterate through all open windows, and check their location, and if the URL is not that of my browser redirect them to my interface, passing the url so it redirects to the correct page but within my interface?

any ideas?
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

you can easily write your own basic browser in java....

just write the code to download content from a given url (probably this has been done before), then feed that content to javax.swing.JEditorPane and there you are :) Now attach eventlisteners to the hyperlinks in the document.. and you are ready to go.... :)


i'm pretty sure there are similar components available for .net....
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Personally, I don't see why you want to create a "browser." Why not just create a page that displays search results and what-not, and let the user navigate it how they wish?
nomis_uk
Forum Newbie
Posts: 7
Joined: Thu Feb 24, 2005 7:34 am

Post by nomis_uk »

by creating a php interface means the system can track the user, and look for relate web sites automatically etc etc.
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

in that case i would write some sort of a proxy... and lookup "related" data... and the modify the data (add the related data to it) that is passed to the browser...

and it doesn't force the user to work with a crippled browser. only with a crippled internet :p
Post Reply