OAUTH ????? ??? ??? ??? ?? ???? ????? ??? ??? ?????. ??? ?? ?3?? OAUTH ?? ???? ??? ? ??, ?? ??? ???? ?? OAUTH ?? ???? ??? ? ???? OAUTH? ?? ????. ????? PHP, JavaScript, Java, Ruby ? ?? ?? ?? ??? ?? ??? OAUTH ??? ???? ?????? ??? ?? ????? OAUTH? ?????. Open API ? ?? ??? ???? Google, Yahoo, Microsoft ? ?? ????? OAUTH ?? ???? ???? ??? ?? OAUTH ??? ?? ?? ??? ??? ??? ???? ????? ?????.
class ServiceFactory { protected $httpClient; protected $serviceClassMap = array( 'OAuth1' => array(), 'OAuth2' => array() ); protected $serviceBuilders = array( 'OAuth2' => 'buildV2Service', 'OAuth1' => 'buildV1Service', ); public function setHttpClient(ClientInterface $httpClient) { $this->httpClient = $httpClient; return $this; } public function registerService($serviceName, $className) { if (!class_exists($className)) { throw new Exception(sprintf('Service class %s does not exist.', $className)); } $reflClass = new \ReflectionClass($className); foreach (array('OAuth2', 'OAuth1') as $version) { if ($reflClass->implementsInterface('OAuth\' . $version . '\Service\ServiceInterface')) { $this->serviceClassMap[$version][ucfirst($serviceName)] = $className; return $this; } } throw new Exception(sprintf('Service class %s must implement ServiceInterface.', $className)); }
? ???? ?? ???? ???? ????? ?? ???? ????? ????????. ?????? ???? ?? ??????! ? ???? ?? ???? ?? ?????? ?????. ??? ???? ???? ??? ????. ??? ??? ?? ??? ?? ??? ???? ????! ??? ?? ?? ??? ???? ????? ????. ???: admin@php.cn
?? ??
![oauth [PHP] Oauth ?? ? ?? ???](/static/imghw/default1.png)
28 Jul 2016
oauth:oauth [PHP] Oauth ?? ? ?? ???: 1. Oauth(?? ??)? ???? ?3? ??????? ????? ??? ???? ?? ???(?: ??, ???, ???)? ???? ? ??? ???? ??? ?????. ??) ?3??? ??? ??? ????? ???? ?? ???: appKey appSecret ??(??) 2. SSO ?? ?? ???? ??? ?????? ???? ?? ?? ??? ?????? ?? ??? ? ?? ??? ????? ?? ???. QQ? ??????. ?? ???? Oauth2.0? ???? ?????. ?? ??? ?????.

29 Jul 2016
??? ?? ??? ?? ?? ?????: ??? ?? ??? ?? ?? ????? ??? ?? ????(1): ? ??? ?????? ???? ??? ??? ??: # ------ --- --------------------- # # ??? ??? ?? 'author' # CREATE TABLE ??? ( author_id int (6) DEFAULT '0' NOT NULL auto_increment, first_name varchar(20)

29 Jul 2016
??? ?? ??? ?? ??: ??? ?? ??? ?? ?? php ??? ?? ?? ?? ??? ??: ??? ?? ??? ?????: <?php /** ?? ????**/ class DefaultController extends AppController { public function index() { $len = 5 ; $str = "ABCDEFGHIJKLNMPQRSTUVWXYZ123456789"; $im = imagecreatetruecolor (70, 20);


??? ??

??? ?? ????? PHP ?????
??? ?? ????? PHP ?????

50?? ??? ??? PHP ???? ??
??? PHP ????, ??? ????? ??? ???? ?????

??? ???? ?? ?? PHP ?????
??? ???? ?? ?? PHP ?????
