Links are good, and Apache is exceptional at serving files -- let it do 
that. 
In other words, don't re-invent a way to serve the files unless there's 
a *spectactularly* compelling reason to do so.

I'm not clear on what your goals are, but serving the files based on ID 
isn't a bad way to go.

If you're looking for a more elegant URL for those documents, you can 
use an apache module called mod_rewrite.

You basically tell apache through a regular expression how to convert 
(transparently -- the user never sees this) a nicer looking link like this:
http://mysite.something.com/articles/0001/
effectively becomes:
http://mysite.something.com/index.php?id=0001

OR
http://mysite.something.com/cuisine/0001/
is effectively:
http://mysite.something.com/category=cuisine&article=0001

That can produce really elegant links for external use, but still get 
you the flexibility that you're looking for from PHP.

-Jeromie
> Looking for ideas. 
>
> The situation: 
> Have a series of PDF documents on one web site. Documents have based on
> something like a product number.
> Desire:
> To be able to set up on other web sites a link which will pull up these
> documents.
>
> Obvious idea:
> Make link with query string:  i.e. www.foo.com?id=xxxx  and xxxx is the
> id number. I would then create a link on that page to the proper pdf
> document that could be clicked and there you have it. The pdf document.
>
> I could also have a form with a text box where the id is typed in and
> then post to www.foo.com?id=xxxx
>
> Other ideas?  For example can I read the document as binary and push it
> out so I don't have the intermediate link? I guess that would mean some
> type of mime header write to deal with the pdf document?
>
> Can I return the pdf document like a web serve or something to the site
> that requested it?
>
>   
> Pat
>
>   



The php_mysql group is dedicated to learn more about the PHP/MySQL web database 
possibilities through group learning.  
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php_mysql/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to