Collection: A basic collection program written in PHP
You can use this collection first and then use empire to process
############################### ################################################ #
#Author: 9elong
#Website: Personal website is not worth mentioning
#Time: 2007-01-01
#Statement: Only for learning PHP.
#Function: Collect single page pictures.
#Note: Three sample forms have been written with regular rules for demonstration. There are no functional descriptions, everything is in the source code.Attached forum picture collection regular demonstration
########################################## #######################################
//Grab the picture from the information page The removed function
function getimg($url,$n,$key,$imgqian,$imgbiao,$titlekey)
{
//$imgqian picture Address prefix
// $imgbiao picture address special identification
‐ ‐ ’ s
out out through out through out through out through out through out out through out out out out out out out out out out out out past ’s towards to sg's till sg''''w-i''suse over''s overuse's over tow between w- to to tossing to ause,
str_replace("{image address}","(.+)",$key);
str_ $c=count($result[0]);
[0][$i]."
";
$img=str_replace($imgbiao,$imgqian.$imgbiao,$img); ( "|http://(.+)jpg|isU",$img,$img);
having having a good start at img[0]).">
";
elseif(ereg("^.*jpg.*$",$img))
{
preg_match("|http://(.+)jpg|isU",$img,$img);
$imgadd[$n]=$img[0];
if($img[0]!="")
$n++;
}
unset($img);
}
$titlekey=str_replace("{图片标题}","(.+)",$titlekey);
$titlekey="|".$titlekey."|isU";
preg_match($titlekey,$msg,$title);
//echo $title[0];
return $title;
return $msg;
return $result;
return $n;
return $imgadd;
}
####################################################################################
#不支持file_get_contents()函数可以使用下面的替换
#$i=0;
#$handle=@fopen($url,"rb");
#while (!@feof($handle))
#{
# $buffer[$i]= @fgets($handle, 4096);
# $i++;
#}
#fclose($handle);
#$msg=join("",$buffer);
########################## ################################################ #######
if($_GET['act']=="getimgadd"&&$_POST['url']!="")
{
$url=$_POST['url'];
getimg($url,"0",$_POST['key'],$_POST['imgqian'],$_POST['imgbiao'],$_POST['titlekey']);
####### ################################################ #########################
$_POST['page']=str_replace("{page address}", "(.+)", $_POST['page']); "|isU";
"All") p $ PC = Count ($ Presult [0]);
Else
$ pc = $ _ Post ['pc'];
if ($ _ post ['pc'] & gt; count ($ Presult [0] ))
/echo $pageurl."
";
"," ","(.+)",$_POST['pagekey']);
Preg_match($pagekey,$pageurl,$N3[$i]) ;
getimg($N3[$i][0],$n,$_POST['key'],$_POST ['imgqian'],$_POST['imgbiao'],$_POST['titlekey']);
########## ################################################ ###############
echo "Picture set 〖". $ Title [1]. "〗". "$ N." Zhang picture was captured & lt; br & lt; a href = '?act='>Return to home page
";
If($_POST['showtype'] == "Picture")
;
";
echo $var."
";
############################################## ################################
//exit();
}
?>
Example 1 (The information page has pagination and uses simple paging regularity):
实例3(信息页没有分页,所以分页正则为空,图片为绝对地址,所以图片地址前缀为空):
The Huasheng Forum picture is attached http://bbs.hnol.net/dispbbs2.asp?boardID=50&ID=336436
Picture address regularity: upload=jpg{Picture address}upload
Picture address identification: bbs
Picture title regularity: Post topic: {Picture title}
Huasheng Forum picture is an external link http://bbs.hnol.net/dispbbs2.asp?boardID= 50&ID=336253
Picture address regularity: img]{Picture address}/img
Picture address identification:jpg
Picture title regularity: Post topic:{Picture title}
The above introduces the basic collection program written in PHP, including collection content. I hope it will be helpful to friends who are interested in PHP tutorials.

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



Does your iPhone show "iCloud Storage Full" whenever you download some files or airdrop something? The free plan of iCloud storage is limited to only 5GB. Therefore, the first thing you should check is the current iCloud storage situation on your phone. If there is still enough storage space and you receive a notification, these solutions will help you troubleshoot. Fix 1 – Delete iCloud Backup Remove the existing version of iCloud backup from your phone settings. Step 1 – Open Settings. Step 2 – You will find your Apple ID at the top of the Settings panel. Click on it to open it. Step 3 – Turn on “iCloud” to open iCloud settings. Step 4 – Down

With the continuous development of Internet of Things technology, real-time data collection has become an indispensable part of the digital era. Among various programming languages, Go language has become an ideal choice for real-time data collection with its efficient concurrency performance and concise syntax. This article will introduce how to use Go language for real-time data collection. 1. Selection of data collection framework Before using Go language for real-time data collection, we need to choose a data collection framework that suits us. The more popular data collection frameworks currently on the market include

Is your iPhone stuck in Do Not Disturb mode? It can be troublesome if you can't toggle Do Not Disturb mode. You won't receive any alerts at all. It won't take much effort to fix this DND issue on iPhone. So, no need to waste any more time and just follow these simple solutions to solve your problem. Fix 1 – Remove the Do Not Disturb schedule If you have any Do Not Disturb schedule on your phone, it may force the device to automatically go into Do Not Disturb mode. Step 1 – Go to your iPhone’s Settings. Step 2 – Next, turn on Focus mode. Step 3 – You will find “Do Not Disturb” at the top of the chart. Step 4 – Open it. Step 5 – On the next page, if you go to the Schedule tab, you

Does your iPhone screen keep returning to the home screen every time you open a specific app? This is an unusual behavior and the reason you are returned to the home screen is that the app crashed for some reason. Troubleshooting will be easier if you follow these set of instructions. Fix 1 – Change Tap Behavior One of the back gestures on iPhone lets you minimize the current app. Disabling the click behavior should resolve this issue. Step 1 – Open Settings. Step 2 – Later, visit Accessibility settings to turn it on. Step 3 – Go to the “Physics & Motors” feature and open the “Touch” settings. Step 4 – Swipe all the way down to the “BackTap” settings. Open it. Step 5 – On the Back Click page, select

Are you getting this error message "Unable to check for updates" message while checking for updates on your iPhone? Usually, this message appears when you manually search for updates while your phone is offline. Therefore, we recommend you to enable Wi-Fi/Cellular data and perform the same operation again. If you're still experiencing the issue, follow the remaining troubleshooting tips. Fix 1 – Enable Wi-Fi/Cellular Data Enable Wi-Fi or Cellular data and try checking for updates again. Step 1 – Simply swipe down to access the Control Center. Step 2 – Enable Wi-Fi or Cellular on your phone. Now try the update process again after enabling network connectivity. Fix 2 – Force restart iPhone if Wi-Fi/Bee is enabled despite

Analysis of the automatic page login and session management functions of Python to implement headless browser collection applications Introduction: With the rapid development of the Internet, our lives are increasingly inseparable from network applications. For many web-type applications, we need to log in manually to obtain more information or operate certain functions. In order to improve efficiency, we can implement automatic page login and session management functions through automated scripts. Headless browser: Before implementing automatic page login and session management functions, we first need to understand what a headless browser is.

Introduction to the basic functions and usage of headless browser collection applications in Python. With the development of the Internet, crawler technology plays an important role in data collection and information mining. A headless browser is an interface-less browser that can simulate user operations in the background, access web pages and grab the required data. Python provides a variety of libraries and tools to implement the functions of a headless browser. This article will introduce how to use Python to implement the basic functions of a headless browser and provide corresponding code examples. 1. Headless browser

Detailed explanation of the page data synchronization and update functions of Python for headless browser collection applications. With the rapid development of the Internet, more and more applications need to interact with web pages for data. When implementing such a function, a common way is to use a headless browser to simulate user operations in order to obtain data on the web page. This article will introduce in detail how to use Python and a headless browser to implement the application's page data synchronization and update functions, and provide corresponding code examples. Environment preparation First, we need to install the relevant Python
