Home > Backend Development > PHP Tutorial > How to collect China proxy server network in php_PHP tutorial

How to collect China proxy server network in php_PHP tutorial

WBOY
Release: 2016-07-13 09:50:36
Original
789 people have browsed it

How to collect China’s proxy server network in PHP

This article describes the method of collecting China’s proxy server network in PHP. Share it with everyone for your reference. The details are as follows:

?

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

/**

* Collect the latest list of China proxy server network

*/

class proxy

{

/* List to be collected */

public $list;

/* Agent list saving path */

public $save_path = 'proxy.txt';

/* Get collection list */

function get_list($page)

{

$url = 'http://www.cnproxy.com/proxy(*).html';

// Processing list

$this->list = preg_replace('/(*)/', $page, $url);

return $this->list;

}

/* Collect proxy content */

function get($page)

{

$this->get_list($page);

$file = stripslashes(file_get_contents($this->list));

$zz = '/

([0-9.] )
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template