SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict
    Join Date
    Jul 2000
    Location
    North Central AR
    Posts
    231
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I working on building a better form. One of the validations I would like to perform is on URL's. How would I checked to see if a URL was anything other than http://www.somesite.com or http://www.somesite.com/ or www.somesite.com ?

    I'm looking to get rid of or reject URL's like http://www.somesite.com/doorway1.html or similar. Sub directories are not a problem, just peole using doorway or gateway pages. Basically I am looking to reject URL's that contain another page other than "index".

    Any ideas? comments?
    Thanks you!

    ronnie
    The largest selection of PLR Articles on the Planet!
    Many Private Label Rights Products.

  2. #2
    midnight coder
    Join Date
    Dec 2000
    Location
    The flat edge of the world
    Posts
    838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This will make sure the person came from the index page...


    if ($HTTP_REFERER != http://www.yoursite.com)
    {
    //person's not from front page
    exit;
    }


    print $HTTP_REFERER to make sure it's in the right format.

  3. #3
    SitePoint Addict
    Join Date
    Jul 2000
    Location
    North Central AR
    Posts
    231
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank Robo, some handy code to have.

    Actually I guess I should have explained better. Other people will be submitting the URL's to me along with other information.
    Thats that URL's I want to validate..

    ronnie
    The largest selection of PLR Articles on the Planet!
    Many Private Label Rights Products.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •