dtjkl42086 2012-10-26 08:32
浏览 27
已采纳

网站网络,数据收集

I am making a web development service which I am trying out at school. The idea is to be able to run my CMS with a student's content. I have made version 2 of the yet un-named CMS which allows the user to make a skin compatible with the CMS and easily use it. This part works fine.

The problem is, I said "We can collect site statistics for your website and notify you if there are any issues with your site." in a presentation, In which people seemed interested. What I need to do is be able to access information from the databases of all my client's sites from my administration domain hosted on another server. I could use a file_get_contents(); on my admin site to retrieve a file on the client's site and echo's it. - Which I think is sloppy

Is there any other way, bearing in mind that my host does not allow database access from one site to another!

Thanks, especially for being able to read my overly long sentences!

  • 写回答

1条回答 默认 最新

  • doucang6914 2012-10-26 19:18
    关注

    Hope this helps:

        function file_get_data($url) {
          $ch = curl_init();
          curl_setopt($ch, CURLOPT_HEADER, 0);
          //Set curl to return the data instead of printing it to the browser.
          curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
          curl_setopt($ch, CURLOPT_URL, $url);
          $data = curl_exec($ch);
          curl_close($ch);
          return $data;
        }
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 想问一下树莓派接上显示屏后出现如图所示画面,是什么问题导致的
  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥15 cmd cl 0x000007b
  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line
  • ¥500 火焰左右视图、视差(基于双目相机)
  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号