English 中文(简体)
课程:多个库克群岛
原标题:Curl: Multiple Cookies
  • 时间:2011-07-05 19:30:38
  •  标签:
  • php
  • curl

我如何能够为每个客户/客户提供多座ok,以管理文字?

计算机 当时有一只手脚。 还将创建txt,计算机B也使用同样的文字,然后是 co。 笔记为坏。

例:

curl_setopt($ch,CURLOPT_COOKIEFILE,"cookie.txt");
curl_setopt($ch,CURLOPT_COOKIEJAR,"cookie.txt");
最佳回答

如果它们回收电脑,那么它就会保存自己的档案系统,每个系统都有自己的 co。

But if you re on shared storage, then use a dynamic filename, perhaps

 cookie-  . $_SERVER[ SERVER_NAME ] .  .txt 

相反,这给你了。

cookie-ComputerA.txt    cookie-ComputerB.txt    etc...
问题回答

您可以向警察披露,要求来自档案名称,并在档案中添加。 除非两台电脑都有相同的公共IP,否则这项工作将继续下去。

你们可以使用独特的识别标志,独特地识别用户。 用户、会议设计或IP地址可以是:

$user_id = get_user_id_from_somewhere();
curl_setopt($ch, CURLOPT_COOKIEFILE, "cookie-".$user_id.".txt");
curl_setopt($ch, CURLOPT_COOKIEJAR, "cookie-".$user_id.".txt");




相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签