分享

写回答

发帖

[提问] GD 怎么开启开启curl.支持?

GoDaddy GoDaddy 8080 人阅读 | 18 人回复

发表于 2008-12-22 02:36:17 | 显示全部楼层 |阅读模式

我有个程序需要开启curl.支持,GD linux主机应该怎么才做呢?

回答|共 18 个

add.c

发表于 2008-12-22 09:33:52 | 显示全部楼层

这里有介绍过
http://bbs.idcspy.com/thread-32036-1-1.html

Rey

发表于 2008-12-22 10:58:01 | 显示全部楼层

代码我找到很多,但我不知道该加到哪个文件。。。或创建一个怎样的文件。。。

add.c

发表于 2008-12-22 11:18:27 | 显示全部楼层

回复 1# 的帖子

GoDaddy的linux主机是支持curl的,不需要另外设置什么,你只要在php程序里使用就ok了

Rey

发表于 2008-12-22 12:49:58 | 显示全部楼层

我彻底对此功能投降。。。开不了

add.c

发表于 2008-12-22 13:22:00 | 显示全部楼层

你的是什么程序,还要开启curl
你要实现什么功能呢?

Rey

发表于 2008-12-22 13:46:02 | 显示全部楼层

我装了UC HOME的一个MSN邀请插件,需要curl。。。

Rey

发表于 2008-12-22 14:13:09 | 显示全部楼层

GD给我的回复,但我不懂。。。谁能帮我看看吗?

The idea behind CURL is that a CURL sessіon іѕ firѕt opened then options are passed though the open session then once finished the CURL sessіon іѕ cloѕed. Below is a PHP example script that will create a CURL sessіon, obtain a fіle, and include the transport headers from the transfer, and finally write the file to a local file.
$ch = curl_init("http://www.example.com/");
$fp = fopen("example_homepage.txt", "w");

curl_setopt($ch, CURLOPT_FILe, $fp);
curl_setopt($ch, CURLOPT_HeADeR, 0);

curl_exec($ch);
curl_close($ch);
fclose($fp);
?>
For a rough breakdown of the CURL componentѕ from the above PHP ѕcript see below.

First the CURL Session is established.
$ch = curl_init("http://www.example.com/");
// Have CURL connect to www.example.com via http

Set the options for CURL to follow
curl_setopt($ch, CURLOPT_FILe, $fp);
// With the informatіon that iѕ received, write it to a local file.
// as Defined by $fP = fopen("example_homepage.txt", "w");
curl_setopt($ch, CURLOPT_HeADeR, 0);
// Include the tranѕPort headerѕ in the data received

Finally, execute the ѕeѕsion and close it.
curl_exec($ch);
// curl_exec will execute the entire CURL session commands
curl_close($ch);
// curl_close terminates the CURL session
fclose($fp);
// fclose ѕіmPly cloѕes the local file which is the output from the CURL session

add.c

发表于 2008-12-22 14:38:44 | 显示全部楼层

回复 8# 的帖子

他给你的是curl的用法,国内有翻译好的,你可以看看

Rey

发表于 2008-12-22 14:40:24 | 显示全部楼层

汗,这些语句是添加在哪里的?有人说是程序文件里,有人说是php.ini文件里,还有人说是.htaccess。。。我快晕了。。
您需要登录后才可以回帖 登录 | 注册

本版积分规则