php 使用curl时,添加cookie

curl_setopt ( $ch , CURLOPT_COOKIE , 'BAIDUID=A7281E0926CB37D791AD464CDD646CF2:FG=1; BIDUPSID=A7281E0926CB37D791AD464CDD646CF2; PSTM=1520817729; REALTIME_TRANS_SWITCH=1; FANYI_WORD_SWITCH=1; HISTORY_SWITCH=1; SOUND_SPD_SWITCH=1; SOUND_PREFER_SWITCH=1; BDUSS=TZuM0IyRVRMZjlTT2FPNmxwRVAzSnJ3aXZZbUt4RnZMTkpSRUpOVldHb1didjVhQVFBQUFBJCQAAAAAAAAAAAEAAADK2HNHTENST09YWAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABbh1loW4dZaM; BDORZ=B490B5EBF6F3CD402E515D22BCDA1598; Hm_lvt_64ecd82404c51e03dc91cb9e8c025574=1526691208,1526881428,1526960636,1527043991; locale=zh; BDRCVFR^[feWj1Vr5u3D^]=mk3SLVN4HKm; PSINO=6; H_PS_PSSID=26351_1465_21117_26350; Hm_lpvt_64ecd82404c51e03dc91cb9e8c025574=1527124602; from_lang_often=^%^5B^%^7B^%^22value^%^22^%^3A^%^22it^%^22^%^2C^%^22text^%^22^%^3A^%^22^%^u610F^%^u5927^%^u5229^%^u8BED^%^22^%^7D^%^2C^%^7B^%^22value^%^22^%^3A^%^22en^%^22^%^2C^%^22text^%^22^%^3A^%^22^%^u82F1^%^u8BED^%^22^%^7D^%^2C^%^7B^%^22value^%^22^%^3A^%^22zh^%^22^%^2C^%^22text^%^22^%^3A^%^22^%^u4E2D^%^u6587^%^22^%^7D^%^5D; to_lang_often=^%^5B^%^7B^%^22value^%^22^%^3A^%^22zh^%^22^%^2C^%^22text^%^22^%^3A^%^22^%^u4E2D^%^u6587^%^22^%^7D^%^2C^%^7B^%^22value^%^22^%^3A^%^22en^%^22^%^2C^%^22text^%^22^%^3A^%^22^%^u82F1^%^u8BED^%^22^%^7D^%^5D' )

你可能感兴趣的:(php)