SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Jul 2001
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PHP, http request, image or document

    Is there a way to tell if an http/web request is a html document or an gif/jpeg or other image type media in PHP? Can I please get an example.

    Matt
    Internet Consultant with 8 Years Experience
    Business Idea/Partnerships contact me, m@zii.com
    AIM: MattFS218 / ICQ: 5138409

  2. #2
    SitePoint Guru Vincent Puglia's Avatar
    Join Date
    Feb 2000
    Location
    where the World once stood
    Posts
    700
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Matt,

    Evidently the advisors/moderators here don't know the difference between a javascript question and a php question. Perhaps you should repost in the server side forum? Offhand, though, I would say you could perform an indexOf operation on the request string and compare it with the extensions you are looking for.

    Vinny
    Where the World Once Stood
    the blades of grass
    cut me still


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
  •