APNS 这玩意啊。关于它曾经转载过N篇文章:
不过自己在實際使用中,也還是遇到了問題。
在測試的時候,我連接apns服務器時,發一條推送就斷開,導致我發送上萬條消息的時候需要幾個小時。我就納悶了,如果大家都這樣,那豈不是那些大網站都要崩潰?這時候,有兩位朋友告訴我,不要斷開,用長鏈接。。。於是乎我重改了代碼,然後就看到消息發送的時候刷刷刷的就出去了。心裏還是非常開心的。
但偶爾還是會有發送失敗的情況出現,所以我做了一點處理,如果取回來的代碼不正確,我會一直重發,直到正確。當然,每次發完後,用usleep,休息了10ms,避免數據過度發送。當然每1000條推送後,我會斷開一下鏈接,再重新鏈接。以防萬一
說白了,還是糾結。
这是一个传说:
- 全新MacBook将使用更纤薄的设计,13寸厚度为18毫米,15寸厚度为19毫米
- 没有光驱
- 13寸全新MacBook将使用分辨率为2560*1600的Retina显示屏,15寸全新MacBook将使用分辨率为2880*1800的Retina显示屏
- 显示屏的边框将比MacBook Pro窄50%
- 使用容量更大的电池,电池使用时间要比MacBook Pro提升15-20%
13寸的全新MacBook和MacBook Pro都将使用集成显卡,而15寸型号将使用来自Nvidia的独立显卡。这种推测与本周早些时候泄露的MacBook Pro配置谍照相同,本周早些时候的谍照显示新款MacBook Pro将搭载Ivy Bridge处理器和USB 3.0接口,除此之外没有任何改变。所以全新MacBook产品将成为Air和Pro的混合体,Kuo认为苹果想要使用Air的外观设计,并为这款产品加 入Pro的运算性能。
--------------------
基于这个传说,我灰常开心,求白富美包养。。。。WWDC2012后,估计就立刻上市了
Introduction
PDO_SQLSRV is a driver that implements the PHP Data Objects (PDO) interface to enable access from PHP to MS SQL Server (starting with SQL Server 2005) and SQL Azure databases.
Installation
The PDO_SQLSRV extension is enabled by adding appropriate DLL file to your PHP extension directory and the corresponding entry to the php.ini file. The PDO_SQLSRV download comes with several driver files. Which driver file you use will depend on 3 factors: the PHP version you are using, whether you are using thread-safe or non-thread-safe PHP, and whether your PHP installation was compiled with the VC6 or VC9 compiler. For example, if you are running PHP 5.3, you are using non-thread-safe PHP, and your PHP installation was compiled with the VC9 compiler, you should use the php_pdo_sqlsrv_53_nts_vc9.dll file. (You should use a non-thread-safe version compiled with the VC9 compiler if you are using IIS as your web server). If you are running PHP 5.2, you are using thread-safe PHP, and your PHP installation was compiled with the VC6 compiler, you should use the php_pdo_sqlsrv_52_ts_vc6.dll file.
For more information about system requirements, see » SQLSRV System Requirements.
The PDO_SQLSRV extension is only compatible with PHP running on Windows. For Linux, see ODBC and » Microsoft's SQL Server ODBC Driver for Linux.
System Requirements (Microsoft Drivers for PHP for SQL Server)
To access data in a SQL Server 2005 or later database using the Microsoft Drivers for PHP for SQL Server, you must have the following components installed on your computer:
-
Supported operating systems for version 3.0 of the driver include:
-
Supported operating systems for version 2.0 of the driver include:
-
Supported operating systems for version 2.0 of the driver include:
-
Windows Server 2003 Service Pack 1
-
Windows XP Service Pack 3
-
Windows Vista Service Pack 1 or later
-
Windows Server 2008
-
Windows Server 2008 R2
-
Windows 7
-
PHP 5. For information about how to download and install the latest stable binaries, visit http://php.net.
Microsoft Drivers for PHP for SQL Server, version 3.0 requires PHP 5.3.0 or later. If possible, use PHP 5.3.6, or later. The version 2.0 driver works with PHP 5.2.4 or later. If possible, use PHP 5.2.13, or later.
-
A version of the driver file must be in your PHP extension directory. See Driver Versions later in this topic for information about the different driver files. See Loading the Microsoft Drivers for PHP for SQL Server for information on configuring the driver for the PHP runtime.
(See The Data Center for the Microsoft Drivers for PHP for SQL Server for information on where to download the Microsoft Drivers for PHP for SQL Server.)
-
A Web server. Your Web server must be configured to run PHP. For information about hosting PHP applications with Internet Information Services (IIS) 6.0, see Using FastCGI to Host PHP Applications on IIS 6.0. For information about hosting PHP applications with IIS 7.0, see Using FastCGI to Host PHP Applications on IIS 7.0.
The Microsoft Drivers for PHP for SQL Server has been tested using IIS 6 and IIS 7 with FastCGI.
-
The x86 version of SQL Server Native Client is required on the computer where PHP is running. If you are using a 64-bit operating system, the x86 version of SQL Server Native Client will be installed with the x64 version of SQL Server Native Client (do not install the x86 version of SQL Server Native Client on an x64 operating system).
If you are using the SQLSRV driver, sqlsrv_client_info will return information about which version of SQL Server Native Client is being used by the Microsoft Drivers for PHP for SQL Server. If you are using the PDO_SQLSRV driver, you can use PDO::getAttribute to discover the version.
This section lists the drivers that are installed for version 2.0 and version 3.0 of the Microsoft Drivers for PHP for SQL Server. PHP version 5.2 is not supported in version 3.0 of the Microsoft Drivers for PHP for SQL Server.
Follow the installation instructions in Loading the Driver to configure the driver for use with the PHP runtime.
Microsoft Drivers 2.0 for PHP for SQL Server installs several versions of the driver:
Driver file
|
PHP version
|
Thread safe?
|
Use with PHP .dll
|
php_sqlsrv_53_nts_vc6.dll
php_pdo_sqlsrv_53_nts_vc6.dll
|
5.3
|
no
|
php5.dll
|
php_sqlsrv_53_nts_vc9.dll
php_pdo_sqlsrv_53_nts_vc9.dll
|
5.3
|
no
|
php5.dll
|
php_sqlsrv_53_ts_vc6.dll
php_pdo_sqlsrv_53_ts_vc6.dll
|
5.3
|
yes
|
php5ts.dll
|
php_sqlsrv_53_ts_vc9.dll
php_pdo_sqlsrv_53_ts_vc9.dll
|
5.3
|
yes
|
php5ts.dll
|
php_sqlsrv_52_nts_vc6.dll
php_pdo_sqlsrv_52_nts_vc6.dll
|
5.2
|
no
|
php5.dll
|
php_sqlsrv_52_ts_vc6.dll
php_pdo_sqlsrv_52_ts_vc6.dll
|
5.2
|
yes
|
php5ts.dll
|
If the name of the driver file contains "vc9", it should be used with a PHP version compiled with Visual C++ 9.0.
Microsoft Drivers 3.0 for PHP for SQL Server installs several versions of the driver:
Driver file
|
PHP version
|
Thread safe?
|
Use with PHP .dll
|
php_sqlsrv_53_nts.dll
php_pdo_sqlsrv_53_nts.dll
|
5.3
|
no
|
php5.dll
|
php_sqlsrv_53_ts.dll
php_pdo_sqlsrv_53_ts.dll
|
5.3
|
yes
|
php5ts.dll
|
由于看了几个VPS都是空间比较小,所以开始考虑是否用第三方存储来放置一些数据。
其实在国外有很多类似的工具,比如dropbox,sugarsync,但这些其实在命令行下用起来都不太方便或者说用PHP调用,所以还是考虑了一些S3或者googlestorage之类的存储。
google有一些现成的工具:https://developers.google.com/storage
Google Cloud Storage is a new service for developers to store and access data in Google's cloud. It offers developers direct access to Google's scalable storage and networking infrastructure as well as powerful authentication and data sharing mechanisms. Developers can store objects of any size and manage access to their data on an individual or group basis using Google Cloud Storage.
Google Cloud Storage is accessible through its REST API or using any of the available Google Cloud Storage tools, including:
- Google Storage Manager - A graphical user interface with drag-and-drop features to manage your buckets and objects.
- GSUtil - A command line tool that lets you perform basic and advanced tasks for Google Cloud Storage.
S3的话,会相对比较资料更多一点,毕竟还是老牌供应商,这里有一篇详细教程:http://www.xieyidian.com/2665,图文并茂,在这里还有文中所提到的计算器:在线计算器
现在还在犹豫,因为毕竟我对这些都不熟,英文也烂,不知道怎么搞比较好,纠结啊。
-------
所以,本文只是备份资料,下次用的时候可以直接找到它