Page 1 of 2

Get a webpage and display it

Posted: Sat Jul 19, 2003 5:10 am
by jamesm87
Hi. I would like PHP to get a webpage and display it instead of redirecting there.

The reason for this is because I want to over come My Schools WebSense (block) system.

I have already realised that adding an s to HTTP can bypass it but some site do not have SSL security, so I want PHP to save the page and display it.

Some websites Automatically refresh the Whole website when you go on it. I think this is because they have <target="_top"> in the page. Is their any way of going pass this?

Also is there a different way of doing this without frames, I think I saw a website which had a middle bit which displayed a webpage, maybe flash will do it?

You can see what I have done so far @ http://hollyfield.port5.com/bpb/

Thankyou!

Posted: Mon Jul 21, 2003 3:15 am
by twigletmac
Perhaps your school has these sites blocked for a reason?

Mac

Posted: Mon Jul 21, 2003 3:28 am
by Gleeb
Purely theoretically, it would be possible to use readfile() to acheive the effect, but I would advise against circumventing any 'netnanny' software, your school probably made you sign something, which means if you DO, you could be punished pretty badly, or taken to court (Happened to a friend of mine, GBP 500.00 damages were awarded, or about USD 800.00)

Posted: Mon Jul 21, 2003 6:06 am
by jamesm87
Ok thanks for your help. My school has websense. I have already organized that it blocks most porn, warez, and illegal websites. I am making this to be like an AOL where it includes messanger and the option to surf the Internet without being traced, my school has no affect apart from pupils who may want to use this.

Luckily the school did not make me sign anything (probably because they didn't think anyone was good enough to do such things).

Really it does not have to involve the school as it is an independent website and is not necessarily aimed at bypassing the school's block (even though it is going to be used to do that :) ).

Posted: Mon Jul 21, 2003 6:22 am
by twigletmac
The fact is is that schools put blocks like these in for a reason (my husband is an ICT teacher so I get to hear that side of the story a lot). They often don't just block things like warez and porn but sites like miniclips that are used by the kids to avoid doing any work. I understand that it is frustrating to be unable to access all the sites you want to but it is your schools right to filter what you have access to.

This does affect the school as you will be going around their security settings and encouraging others to do the same - I'm sure they won't be too thrilled when they find out (as they will eventually). Access the sites you can't use at school at home or in your local library. If you feel very strongly that your school has made a mistake in blocking certain sites ask them to unblock them.

Mac

Posted: Mon Jul 21, 2003 6:33 am
by jamesm87
lol thanks for the reply... i was writing a reply to you when you sent in your one. Yes I fully agree and take on what you say, but this block is for the whole of the Kingston Borough so all library and schools in the Kingston Borough are affected.

Perhaps I should make it so that it bypass's at after school times and breaks if they are from the Kingston Borough IP address... that will make the ICT teacher happy and the pupils.

I have already blocked sites on this script which include porn, warez, and other illegal stuff.


Any thoughts on this topic?
Thankyou :D

Hmmm...

Posted: Mon Jul 21, 2003 6:45 am
by gjb79
If this script is to be used with good intentions, and will block all the websites n stuff that the schools own software does, You may find it useful and helpful to speak with your schools computer administrator.

It sounds to me as though you are trying to organize local resourses in your community (ie. Library and school) as well as offer a place for people in the community to talk online with one another, though am I wrong to think your aiming this towards only students?

If this is the case you may find that teachers will encourage the idea as they no doubt will see the benifits of students aiding each other with home work n stuff, and having access to library and school resourses outside the classroom, even if that isn't something you originally had in mind.

Posted: Mon Jul 21, 2003 6:51 am
by jamesm87
Thats exaclty what I had in mind. Also thanks for saying
If this is the case you may find that teachers will encourage the idea as they no doubt will see the benifits of students aiding each other with home work n stuff, and having access to library and school resourses outside the classroom, even if that isn't something you originally had in mind.
Thats has given be a big boost in creating this script. It will be open to all people but I am aiming this mainly at students, expecially around my area and school. It will block most websites which the school already blocks but it will keep some websites which the company "WebSense" have blocked due to a KeyWord Filter when they are perfectly fine sites.

Thankyou for your reply

James

Posted: Mon Jul 21, 2003 7:16 am
by twigletmac
Urgh, I hate it when schools use external filters that they have no control over. I know there are some filters which won't allow access to sites with essex in the name - because part of that word is 'sex' :?

Definitely try and get the ICT department in on this because if you don't you may find that you get into trouble for the circumvention even if you have blocked access to porn/warez/etc sites. Nothing's worse than having all of your internet access rights revoked...

Consider sending complaints (and getting other students and possibly teachers to send complaints) to the council about the generic nature of the filtering - use official complaint forms if you can and make sure that they are well written and clear. Then pester them about when they're going to take action - you might get them to think a bit more about how they handle internet filtering.

Mac

Posted: Mon Jul 21, 2003 7:35 am
by jamesm87
thanks for that, I will definatly take on the points you have given.


Is it possible to get a webpage's HTML into a variable so that it can be adjusted and echo'd

Thanks

James

Posted: Mon Jul 21, 2003 7:36 am
by Gleeb
Woah, Twig's a Chick? ;)

Posted: Mon Jul 21, 2003 7:48 am
by jamesm87
Woah, Twig's a Chick?
Woah, Twig's an Admin Too! :wink: lol

Posted: Mon Jul 21, 2003 7:50 am
by twigletmac
jamesm87 wrote:Is it possible to get a webpage's HTML into a variable so that it can be adjusted and echo'd
If you have PHP 4.3.0 and the fopen wrappers have been enabled you could use get_file_contents(), alternatively for older PHP versions (but you still need the fopen wrappers enabled) you could use file().

Mac

Posted: Mon Jul 21, 2003 7:52 am
by jamesm87
ok thankyou

Posted: Mon Jul 21, 2003 9:46 am
by m3rajk
Gleeb wrote:Woah, Twig's a Chick? ;)
i didn't know either. but she does have a point.
sex is an issue as a flag.
this is because it stops sites that are legitimate...namely anything from essex uk, that mentions middlesex county (there's gotta be one in every state in the us) as well as sites that deal with sexual education, something that most kids seem to be in desperate need of (let's just say that if most of the town i'm from doesn't have stds, i'd be suprised considering how a large portion of the kids from my hs are....)

my personal feeling is that sex should only be used as a keyword in when paired with something else.