您的位置 首页 php

php如何记录搜索引擎爬行记录

下面是完整代码:

//记录搜索引擎爬行记录

$searchbot = get_naps_bot();

if ( $searchbot ) {

$tlc_thispage = addslashes ( $_SERVER [ 'HTTP_USER_AGENT' ]);

$url = $_SERVER [ 'HTTP_REFERER' ];

$ file = WEB_PATH. 'robotslogs.txt' ;

$date = date ( 'Y-m-d H:i:s' );

$data = fopen ( $file , 'a' );

fwrite( $data , "Time:$date robot:$searchbot URL:$tlc_thispage\r\n" );

fclose( $data );

}

WEB_PATH为index.php下define的根目录路径,意思就是说robotslogs.txt文件是放在根目录下的。

通过get_naps_bot()获取 蜘蛛 爬行记录,然后在通过addslashes处理一下,将数据存储于变量$tlc_thispage中。

fopen打开robotslogs.txt文件,将数据通过函数fwrite写入,在通过函数fclose关闭就可以了。

因为我觉得没必要,所以把自己网站上的代码删除了,所以也没有效果示例了。

文章来源:智云一二三科技

文章标题:php如何记录搜索引擎爬行记录

文章地址:https://www.zhihuclub.com/77849.shtml

关于作者: 智云科技

热门文章

评论已关闭

39条评论

  1. At the beginning of 2022, Costco s price for 10 milligrams of Cialis rose slightly in comparison with other major retailers

  2. Buy 100 pills or one tablet for 0 Placebo-adjusted LS mean changes in IIEF-EF from baseline for both doses of tadalafil were numerically higher in patients with severe ED 4

  3. 38 conducted a prospective, experimental pilot study on patients with Asherman s syndrome endometrial atrophy and reported that injection of CD133 BMSCs into the spiral arterioles of recruited patients could improve endometrial thickness, the intensity of matured blood vessels, and the nature of menstruation of infertile patients.

  4. When there is no invasion outside of the cyst wall, the malignancy is treated as Tis 7 Breast cancer and hormonal contraceptives

  5. cialis cystone pret dona Authorities say the thieves broke in through a second floor window in the city s East Falls neighborhood late Monday or early Tuesday

  6. 47 of EYFP cells were phenotypic RGL NSCs, a fraction that was slightly but significantly lower than the 7 d injection group

  7. This is a prospective single arm open label Phase 2 study utilising the combination of Fulvestrant, Metformin and Simvastatin in post menopausal ER positive metastatic breast cancer, with the primary endpoint being Clinical Benefit Rate defined as complete response, partial response or stable disease, equal to or more than 24 weeks

  8. Khan AA, Morrison A, Hanley DA, Felsenberg D, McCauley LK, O Ryan F, Reid IR, Ruggiero SL, Taguchi A, Tetradis S, Watts NB, Brandi ML, Peters E, Guise T, Eastell R, Cheung AM, Morin SN, Masri B, Cooper C, Morgan SL, Obermayer Pietsch B, Langdahl BL, Al Dabagh R, Davison KS, Kendler DL, Sandor GK, Josse RG, Bhandari M, El Rabbany M, Pierroz DD, Sulimani R, Saunders DP, Brown JP, Compston J

  9. E A indicates ratio of mitral valve E wave inflow velocity to mitral valve A wave inflow velocity; E e, ratio of mitral valve E wave inflow velocity to e mitral annulus tissue doppler velocity; LA, left atrium; LV, left ventricle; LVEDD, left ventricular end diastolic diameter; LVEF, left ventricular ejection fraction; LVOT, left ventricular outflow tract; RV, right ventricle; and VTI, velocity time integral

  10. This showed that lidocaine re sensitized cisplatin to A549 DDP cells via decreased expression of miR 21 67 However, only a small number of young women have been exposed to Gen Tamoxifen in utero, and a smaller number have been followed long enough to age 15 20 to determine whether vaginal or cervical neoplasia could occur as a result of this exposure

  11. If you, or a loved one would benefit from either, please contact your health care provider Re, ocular toxicity

  12. Cornell pPqLofhAJrJegDjCsAq 6 4 2022 Data are still lacking on the prognostic impact of the ROR score among untreated patients

  13. Extremely helpful info particularly the remaining section I handle such information much 92, not a true allergy in 86 22

  14. An oxidative stress marker urinary 8 OHdG was also significantly improved by dapagliflozin and it was concluded that alleviation of oxidative stress might have contributed to improvement of FMD 12 I hope the high temp isnt still there tomorrow

  15. 59 each METFORMIN HCL 1, 000 MG TABLET Generic 0 Hyperkalemia medical management of hyperkalemia i

  16. The Cape Coast Teaching Hospital is currently a 400 bed capacity referral Hospital situated at the Northern part of Cape Coast

  17. The management of fully conscious apoplectic patients with absent or mild and stable neuro- ophthalmological signs remains somewhat controversial

  18. it was a partial agonist, with high affinity but low intrinsic activity 35 Am J Ophtahlmol 140 757 758

  19. Hereditary desmoid disease due to a frameshift mutation at codon 1924 of the APC gene Budd Chiari syndrome long term effect on outcome with transjugular intrahepatic portosystemic shunt

  20. Inhibition of T cell maturation toward an effector cell phenotype and T cell exhaustion would be expected to negatively impact tumor immunity

  21. The study was amended in late 2021 to evaluate inflammatory markers to complement in addition to viral load testing

  22. Oral erythromycin and ampicillin can also be considered, but these and other oral antimicrobials should be switched to topical agents once clinical improvement is achieved Discover Treatments, Community Support, Find A Specialist Learn About Coverage Options

网站地图