Web-php implements the same link and only displays the content once.

Source: Internet
Author: User
There is such a requirement that a list page has more than n link addresses, requiring that the content be displayed once becomes invalid (Note: All content is obtained through the interface, pages generated by the proxy peer are required. Do not expose the peer url directly to avoid sharing ). Use PHP. Please show your experts... there is such a requirement that a list page has more than n link addresses, requiring that the content be displayed once becomes invalid (Note: All content is obtained through the interface, pages generated by the proxy peer are required. Do not expose the peer url directly to avoid sharing ).
Use PHP. Thank you for your help.
Note: once this link is opened, it means you cannot copy and share it, instead of opening it again on another computer.

Reply content:

There is such a requirement that a list page has more than n link addresses, requiring that the content be displayed once becomes invalid (Note: All content is obtained through the interface, pages generated by the proxy peer are required. Do not expose the peer url directly to avoid sharing ).
Use PHP. Thank you for your help.
Note: once this link is opened, it means you cannot copy and share it, instead of opening it again on another computer.

Code writing has to be debugged. I don't like it ......

Give me a simple idea.

Database main table: Link Access Code add link: the initial access code is generated when the link is added. You can directly use the link address for digest as the access code (such as MD5 ). Generate Link List: Obtain and output the access code of the specified link based on the database. Access link: the link is reverse checked based on the access code for redirect. Abstract The current access code to obtain the new access code and store it in the database.

Not carefully reading the question ...... Correction in the same way ......

Main database tables:
Table 1:
Access code Link
Table 2:
Proxy count

Proxy:
The number of proxies in Table 2 + 1 per Proxy
Each link and proxy times are used as the access code (for example, the proxy times and links are connected into a string before MD5), and written to table 1.
Similargo.php?xxxxxOutput links in the page. Xxxxx indicates the access code.

Access link:
On the page, click to accessgo.php?xxxxxURL, in which xxxxx is the access code.
Query a table entry in the database based on the access code. If no entry is found, the link is invalid. If found, retrieve the link for redirect and delete the entry to make sure the next access is invalid.

Similar to burning after reading?

  1. The links on the list page are crawled and stored. When the URL is opened once, a database query is performed. If yes, the database is loaded and deleted. If no, no status is returned.
  2. Perform data inventory on the list URL and addreadField, ifread = falseLoad the content and setread = true, Ifread = trueNo status is returned.


  

Use the hash value of UA + IP in the current browser as the key
Set the address (for example, a. php? Id = 3) to encrypt the encrypted string (such as abcdefg)
Then list the address B. php? Id = abcdefg. php decrypts the ID. If it cannot be decrypted, an error is returned and access is not allowed.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.