doujuan2688 2011-12-22 17:18
浏览 6
已采纳

Php读取内容更改/添加到网站[关闭]

I came across a situation which looks difficult as I am newbie. I searched on google but could not get any idea about it. There is a site which provide users a facility to search for doctors in their area/state etc.

There may be a situation when number of doctors addresses can be increased on that site in any state. How can I know this new doctor added in that site, without visiting and searching in that site.

In other words. Suppose you have a site. If you change your site content. How can I know that you change your site contents.

I want to syncs the records with theirs, either daily or weekly because their databases changes.

  • 写回答

2条回答 默认 最新

  • doutang1873 2011-12-22 17:29
    关注

    you can use cURL in PHP.

    a basic example of usage :

    <?php
    
        $ch = curl_init("http://www.example.com/");
        $fp = fopen("example_homepage.txt", "w");
    
        curl_setopt($ch, CURLOPT_FILE, $fp);
        curl_setopt($ch, CURLOPT_HEADER, 0);
    
        curl_exec($ch);
        curl_close($ch);
        fclose($fp);
    ?>
    

    You can also define a whole range of parameters, so it's easy to mimic a POST or GET - then you run the script regularly as a CRON job, save the results each time to a new file and compare it to the old one with PHP

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 有偿求码,CNN+LSTM实现单通道脑电信号EEG的睡眠分期评估
  • ¥15 没有证书,nginx怎么反向代理到只能接受https的公网网站
  • ¥50 成都蓉城足球俱乐部小程序抢票
  • ¥15 yolov7训练自己的数据集
  • ¥15 esp8266与51单片机连接问题(标签-单片机|关键词-串口)(相关搜索:51单片机|单片机|测试代码)
  • ¥15 电力市场出清matlab yalmip kkt 双层优化问题
  • ¥30 ros小车路径规划实现不了,如何解决?(操作系统-ubuntu)
  • ¥20 matlab yalmip kkt 双层优化问题
  • ¥15 如何在3D高斯飞溅的渲染的场景中获得一个可控的旋转物体
  • ¥88 实在没有想法,需要个思路