1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

PHP and 404

Discussion in 'PHP' started by danpadams, Mar 10, 2005.

  1. #1
    Does anyone know of a way to have PHP spit out a 404 code error that will be recognized be the SEs? I know I can have PHP output a 404 error that is readable by the humans, but I also want to be able to have it understood by the SEs. I was curious does anyone know about this or where to find info on this?
     
    danpadams, Mar 10, 2005 IP
  2. palespyder

    palespyder Psycho Ninja

    Messages:
    1,254
    Likes Received:
    98
    Best Answers:
    0
    Trophy Points:
    168
    #2
    don't know if this is exactly what you are looking for but

    header("Status: 404 Not Found");
    PHP:
    This will return the proper status IIRC.
     
    palespyder, Mar 10, 2005 IP
  3. Crazy_Rob

    Crazy_Rob I seen't it!

    Messages:
    13,157
    Likes Received:
    1,366
    Best Answers:
    0
    Trophy Points:
    360
    #3
    A 404 is a 404 to SE's.
     
    Crazy_Rob, Mar 10, 2005 IP
  4. danpadams

    danpadams Peon

    Messages:
    101
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I understand a 404 is a 404, but then I guess what I am producing is not truely a 404. On the other hand, I think what palespyder said makes sense, since I can use the header() function as long as I have not output stuff to the browser. But the header function will still allow me to do the human nice stuff.

    Thanks much
     
    danpadams, Mar 10, 2005 IP
  5. danpadams

    danpadams Peon

    Messages:
    101
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I used it, and it did what I wanted, thank you.
     
    danpadams, Mar 10, 2005 IP
  6. palespyder

    palespyder Psycho Ninja

    Messages:
    1,254
    Likes Received:
    98
    Best Answers:
    0
    Trophy Points:
    168
    #6
    No problem danpadams, glad I actually posted something helpful ;)
     
    palespyder, Mar 10, 2005 IP
    danpadams likes this.