PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Problem with php coding

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem with php coding

    I'm having problems trying to pick up pdf files. If I use a plain php file it works fine, but I'm trying to allow only members to see the PDFs. Therefore my php code says if you are a member here's the pdf list, if not send an error message. The spider is unable to detect my pdf list within this code and my pdfs are not being indexed.
    Are there any specific rules around php coding? The PDF list is within an editable content managed region.

  • #2
    The spider will only see the links that it is given by your PHP script.

    If your PHP script is written in such a way so as to NOT render the PDF links to the client (that would be either a web browser or a web spider) then there is no way the spider will see these links (just as a user with a web browser would not be able to see the links, as you intended).

    So if you have some way to identify a member or authenticated user, then you need to also handle this with the spider.

    You can either:
    (a) Make the spider login and authenticate as a member on your site, as described in this FAQ:
    Q. How do I index protected parts of my website requiring user authentication?

    (b) Change your script so that it will always allow the spider to see the member pages without authenticating. You can do this by looking at the UserAgent string of the client and/or checking the IP address. See here:
    http://www.wrensoft.com/zoom/support/useragent.html
    --Ray
    Wrensoft Web Software
    Sydney, Australia
    Zoom Search Engine

    Comment


    • #3
      Thanks

      Thanks Ray - your help is much appreciated. I have now got a working version.

      Comment

      Working...
      X