简体   繁体   中英

Dynamic url using php

I have seen some websites which ask for a valid email address and send dynamically created download link to the email address. The file will exist in the same location. How is it possible to have different dynamic urls to point to the same location?

I need to do a similar implementation using php. Please suggest.

A dynamic url is one that includes datal while static are just links that access a page. Dynamic link: http://www.somesites.com/forums/thread.php?threadid=12345&sort=date because on the page thread.php

someone can use these these functions to load data into the main page thread.php
$myvar = $_GET['threadid']; //which is 12345
$myvar2 = $_GET['sort']; //which is 'date'

Static link:http://www.somesites.com/forums/the-challenges-of-dynamic-urls.htm This is static because there is no data stored in it; it is just used to point to a page.

For links pointing to the same page an example would be: index.php?var=5 and index.php " Both of these URLs point to two different pages. But if the search engine purges the information after the first offending character, the question mark (?), now both pages look the same "; so they are very similar; just the first one can submit data onto that page.

To learn more about static and dynamic links check out: http://www.webconfs.com/dynamic-urls-vs-static-urls-article-3.php

Generally speaking, they don't point to the same location. That would be a redirect and would cause the "real" URL (without any authentication protection on it) to be available to the client who could share it.

The server side code just picks the file off the file system and returns it directly (eg with readfile (don't forget to set the Content-Type header)).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM