After writing the extended link function, how do I write the function that stores the link as a queue? {Code...} a video says that the function of the Link Library includes: 1. Store the link; 2. Remove the link; 3. Set the priority of the link. Practical solutions include: 1. stored in the database; 2. redis; 3. Memory set; 4... after the extended link function is written, how can I write the function that stores the link as a queue?
// Extended link function public function extractLink ($ page) {$ matches = array (); $ pat = "# href = \" (http: // xxxx/yyy/zzz. php \? Id = \ d + $) \ "# I"; preg_match_all ($ pat, $ page, $ matches, PREG_PATTERN_ORDER); for ($ I = 0; $ I
The function of a link library in a video includes: 1. Store links; 2. deduplicate links; 3. set priority for links.
Practice solutions: 1. stored in the database; 2. redis; 3. Memory set; 4. queue.
However, if there is a problem with the video, there will be no content later.
Reply content:After writing the extended link function, how do I write the function that stores the link as a queue?
// Extended link function public function extractLink ($ page) {$ matches = array (); $ pat = "# href = \" (http: // xxxx/yyy/zzz. php \? Id = \ d + $) \ "# I"; preg_match_all ($ pat, $ page, $ matches, PREG_PATTERN_ORDER); for ($ I = 0; $ I
The function of a link library in a video includes: 1. Store links; 2. deduplicate links; 3. set priority for links.
Practice solutions: 1. stored in the database; 2. redis; 3. Memory set; 4. queue.
However, if there is a problem with the video, there will be no content later.
What videos? What tutorial? What are you talking about?
The queue is not saved as an array, and then does array_shift and array_push?
Try beanstalk.