$curl = new Curl(); $data = 'Email='.urlencode('MYEMAIL@EMAIL.COM').'&Passwd='.urlencode('MYPASSWORD').'&accountType=GOOGLE&source=Google-cURL-Example&service=jotspot'; $curl->post('https://www.google.com/accounts/ClientLogin',$data); //match authorization token preg_match("!Auth=(.*)!",$curl->response,$match); $auth = $match[1]; //set curl headers $curl->set_headers(array( 'Content-Type: application/atom+xml; charset=utf-8','Host: sites.google.com','GData-Version: 1.4','Authorization: GoogleLogin auth='. trim($auth))); //get a list of sites associated with my domain $curl->get('https://sites.google.com/Feeds/site/clevertechie.mygbiz.com'); //contains data returned by $curl->get(); echo $curl->response;
因此,我没有从$curl->响应中获取网站列表,而是收到一条消息 – “prolog中不允许使用内容”.我到处寻找并无法找到解决方案,请帮忙!谢谢!