10 Replies - 318 Views - Last Post: 24 June 2012 - 03:15 PM

#1 ROCKY86  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 47
  • Joined: 05-August 07

How to block website

Posted 22 June 2012 - 07:14 AM

hi, I want to create a php file, in which it can block any URL that i key into the code, can someone help me how do i start doing it? for example: if i enter the url:google.com, then google.com will be blocked
Is This A Good Question/Topic? 0
  • +

Replies To: How to block website

#2 Atli  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 3115
  • View blog
  • Posts: 4,675
  • Joined: 08-June 10

Re: How to block website

Posted 22 June 2012 - 07:29 AM

What do you mean "blocked"? Blocked from whom?
Was This Post Helpful? 0
  • +
  • -

#3 RudiVisser  Icon User is offline

  • .. does not guess solutions
  • member icon

Reputation: 994
  • View blog
  • Posts: 3,547
  • Joined: 05-June 09

Re: How to block website

Posted 22 June 2012 - 07:31 AM

Blocked how?

PHP is server side. People browsing on the internet will not be routed through your server unless it is a proxy server, in which case it would already have (most likely) URL filtering.
Was This Post Helpful? 0
  • +
  • -

#4 ROCKY86  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 47
  • Joined: 05-August 07

Re: How to block website

Posted 22 June 2012 - 05:41 PM

hi, for example, I am developing a firefox extention, in which when the user clicked on a button, the current webpage url will be added to BLACKLISTED aka blocked, so when the user try to enter that url again, it will be blocked, so I need to create a php to support that blacklisted function :yes:
Was This Post Helpful? 0
  • +
  • -

#5 Atli  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 3115
  • View blog
  • Posts: 4,675
  • Joined: 08-June 10

Re: How to block website

Posted 22 June 2012 - 05:54 PM

I don't get how PHP would be useful in that situation. PHP is typically used as a server-side scripting language. It has no power to black-list anything on the client-side. - Perhaps if the server PHP operated on was acting as some sort of a proxy server, and the client was forced to route through that, then it may be of some use. (Although there are probably better options for even that.)

From my limited understanding of Firefox extensions, you would want to use Javascript to compile your blacklist, saved either using some client-side web storage (like the HTML5 localStorage API) or perhaps some sort of a SQLite database.
Was This Post Helpful? 1
  • +
  • -

#6 no2pencil  Icon User is offline

  • Original Digital Gansta
  • member icon

Reputation: 4501
  • View blog
  • Posts: 24,965
  • Joined: 10-May 07

Re: How to block website

Posted 22 June 2012 - 07:16 PM

If you do not wish for google to spider your site, you should add it to the robots.txt file. PHP is not the tool for this.

** Topic moved to Web Servers & Hosting **
Was This Post Helpful? 0
  • +
  • -

#7 ROCKY86  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 47
  • Joined: 05-August 07

Re: How to block website

Posted 22 June 2012 - 10:33 PM

View Postno2pencil, on 22 June 2012 - 07:16 PM, said:

If you do not wish for google to spider your site, you should add it to the robots.txt file. PHP is not the tool for this.

** Topic moved to Web Servers & Hosting **

hi what do you mean by robots.txt.file?
Was This Post Helpful? 0
  • +
  • -

#8 no2pencil  Icon User is offline

  • Original Digital Gansta
  • member icon

Reputation: 4501
  • View blog
  • Posts: 24,965
  • Joined: 10-May 07

Re: How to block website

Posted 22 June 2012 - 11:37 PM

It's too bad that they don't make a website where you can search for things.

Oh wait, they do. You could have found this 2 hours ago via Google. But that's ok, good things come to those who wait ;)
Was This Post Helpful? 0
  • +
  • -

#9 ROCKY86  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 47
  • Joined: 05-August 07

Re: How to block website

Posted 23 June 2012 - 02:36 AM

Hi, thank for the robot.txt help, but I dun think it really does what I want to do, Basically my goal is to create a javascript in which whenever a user click on a widget that i created on firefox, the widget will pop out with a window telling if the website the user is surfing is a phishing website or not, so i need to create someting in which, it can detect the url of potiential phishing site
Was This Post Helpful? 0
  • +
  • -

#10 no2pencil  Icon User is offline

  • Original Digital Gansta
  • member icon

Reputation: 4501
  • View blog
  • Posts: 24,965
  • Joined: 10-May 07

Re: How to block website

Posted 23 June 2012 - 05:32 PM

I understand what you are trying to accomplish. But your chosen execution point doesn't make a lot of sense. Domain name resolution occurs at the networking level, & is handled by the Operating System. I would think this would be a better point of evaluation than a web based language such as PHP or Javascript. Otherwise you are only going to evaluate the site that is currently being viewed. This would not make any sense to me.

I will admit I am not certain as to Atli's suggestion for using Javascript for a plugin with firefox. If that's the method you wish to take, I'll gladly move the topic there for better visibility by language association.
Was This Post Helpful? 0
  • +
  • -

#11 denting5  Icon User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 84
  • Joined: 03-June 12

Re: How to block website

Posted 24 June 2012 - 03:15 PM

View PostROCKY86, on 22 June 2012 - 10:33 PM, said:

View Postno2pencil, on 22 June 2012 - 07:16 PM, said:

If you do not wish for google to spider your site, you should add it to the robots.txt file. PHP is not the tool for this.

** Topic moved to Web Servers & Hosting **

hi what do you mean by robots.txt.file?

A robots.txt file is a file that alerts Google's web crawlers that you do not want your site to be indexed. After placing this file, your site will not be present in any of Google's databases.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1