开发者

Get into website

I used below code to get into a website.

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'www.g.com');

curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERPWD, "aa:qq");
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH开发者_开发技巧_BASIC);
$output = curl_exec($ch);
$info = curl_getinfo($ch);
curl_close($ch);

But i m getting blank page.Whre am i going wrong?


You don't echo or print anything.

Try echo $info; or echo $output;

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜