php curl时候得不到cookie - PHP / 基础编程
PHP code:
$cookie_jar = tempnam('./htdocs','cookie');
$curlPost = "username=tengkyky&passwod=yanyan2&mem_pass=on";
$ch = curl_init();
$my_url = 'https://passport.baidu.com/?login';
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_jar);
curl_setopt($ch,CURLOPT_URL,$my_url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,$curlPost);
ob_start();
curl_exec ($ch);
ob_end_clean();
curl_close ($ch);
unset($ch);
这个是百度登陆的,我想取他的COOKIE。
但是运行下来,没这个COOKIE文件
只是为找COOKIE有什么办法
这么晚了,该休息了,说不定睡一觉就解决了……可以把代码都贴出来吗?
{{
相关问答:
我最近写了个mail执行后没有出现错误信息执行完毕后邮箱里并没发送邮件,请各位帮我看看
我用的的是iis smtp
<?php
$to = 'xueyuxia1988@sohu.com';
$subject = 'the subject';
$message = 'hello';
$ ......
请教高手帮忙,session_start()放在外部的文件用 require 或 include 包含进来,请问这样做合理吗??代码运行是正常的,这样做合理吗??请高手指点。。。。 谢谢····
require 或 include ......
急求:在php脚本里怎么调用js文件里方法?
或者在js文件里调用php文件写的seesion?
PHP刚入门学习,友情顶一个
急求:在php脚本里怎么调用js文件里方法?
//echo '<script>alert("ok");< ......
是用别人写的类做的,还原时提示You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INSERT INTO admin(seq,passwd,type,n ......
我用php文件上传
使用move_upload_file(),
一上传文件就出错了,
出错的信息是
Warning: move_uploaded_file(F:\Server\www\): failed to open stream: Permission denied in F:\Server\www\eoool\finish\uploa ......