当前位置: 首页>>代码示例>>PHP>>正文


PHP unknown::post方法代码示例

本文整理汇总了PHP中unknown::post方法的典型用法代码示例。如果您正苦于以下问题:PHP unknown::post方法的具体用法?PHP unknown::post怎么用?PHP unknown::post使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在unknown的用法示例。


在下文中一共展示了unknown::post方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: login

 /**
  * undocumented function
  *
  * @param unknown $user 
  * @param unknown $pass 
  * @return void
  * @access public
  */
 function login($user = null, $password = null)
 {
     if (empty($user)) {
         extract($this->config);
     }
     if (@empty($user) || @empty($password)) {
         return trigger_error('Please specify a user / password for using this service');
     }
     $post = array('continue' => 'http://www.google.com/analytics/home/?et=reset&hl=en-US', 'service' => 'analytics', 'nui' => 'hidden', 'hl' => 'en-US', 'GA3T' => 'ouVrvynQwUs', 'Email' => $user, 'PersistentCookie' => 'yes', 'Passwd' => $password);
     $response = $this->Http->post('https://www.google.com/accounts/ServiceLoginBoxAuth', $post);
     if (!strpos($response, 'TokenAuth?continue')) {
         return $this->connected = false;
     }
     $this->config['database'] = $user;
     return $this->connected = true;
 }
开发者ID:afzet,项目名称:cake-cart,代码行数:24,代码来源:google_analytics_source.php

示例2: post

 /**
  *
  * @return \Illuminate\Routing\Route
  */
 public function post()
 {
     // $response = $this->client->post($this->endpoint, $this->getRequestVars());
     // return new NvpResponse($result);
     try {
         // Grab the client's handler instance.
         $clientHandler = $this->client->getConfig('handler');
         // Create a middleware that echoes parts of the request.
         $tapMiddleware = Middleware::tap(function ($request) {
             print_r($request->getHeader('Content-Type'));
             // application/json
             echo $request->getBody() . "\n";
             echo $request->getUri() . "\n";
             // {"foo":"bar"}
         });
         $response = $this->client->post($this->endpoint, ['json' => $this->getRequestVars(), 'handler' => $tapMiddleware($clientHandler)]);
     } catch (GuzzleHttp\Exception\BadResponseException $e) {
         echo 'Uh oh! ' . $e->getMessage();
     }
     return $response;
 }
开发者ID:solvire,项目名称:LeadFerret-API-PHP-SDK,代码行数:25,代码来源:Request.php

示例3: addProfile

 /**
  * undocumented function
  *
  * @return void
  * @access public
  */
 function addProfile($profile)
 {
     if (!is_array($profile)) {
         $profile = array('url' => $profile);
     }
     $profile = am(array('domain' => null, 'name' => null, 'account' => null, 'countryCode' => null, 'timeZone' => null, 'post' => array()), $profile);
     $profile['account'] = $this->accountId($profile['account']);
     if ($profile['domain']) {
         $profile['domain'] = $this->profileId($profile['domain']);
     }
     if (is_string($profile['url'])) {
         preg_match('/(http|https)+:\\/\\/(.+)/', $profile['url'], $match);
         $profile['url'] = array('scheme' => $match[1], 'url' => $match[2]);
     }
     $post = am(array('aid' => 1101, 'vid' => 1151, 'rd' => 'vid=1100&scid=' . $profile['account'], 'usac_id' => null, 'ucpr_web_site_url' => null, 'uiti_id' => 293, 'uiti_id_orig' => 1, 'ubwe_new' => (int) (!$profile['domain']), 'ucpr_protocol' => $profile['url']['scheme'], 'ucpr_url' => $profile['url']['url'], 'uswe_id' => $profile['domain'], 'ucpr_name' => $profile['name'], 'ucpt_country_code' => $profile['countryCode'], 'tzCode' => $profile['timeZone']), $profile['post']);
     $response = $this->Http->post('https://www.google.com/analytics/home/admin?scid=' . $profile['account'], $post);
     if (!preg_match('/rid=([\\d]+)/', @$this->Http->response['header']['Location'], $match)) {
         return false;
     }
     $this->listSources(true);
     return (int) $match[1];
 }
开发者ID:jimiyash,项目名称:debuggable-scraps,代码行数:28,代码来源:google_analytics_source.php


注:本文中的unknown::post方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。