简体   繁体   中英

Why my page not work when i add www.irctc.co.in in my url then page redirect on that site while its working good

I want irctc.co.in page load in my page.Why my page not work when i add www.irctc.co.in in my url then page redirect on that site while its working good. So please tell me the thing that it do not redirect on that site that site load in my webpage.

<?php
// URLs we want to retrieve
$urls = array(
'http://www.google.com',
'http://www.bing.com',
'http://www.yahoo.com',
'http://www.twitter.com',
'http://www.facebook.com',


'www.irctc.co.in'         //it creates problem WHY

);

// initialize the multihandler
$mh = curl_multi_init();

$channels = array();
foreach ($urls as $key => $url) {
// initiate individual channel
$channels[$key] = curl_init();
curl_setopt_array($channels[$key], array(
    CURLOPT_URL => $url,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true
));

// add channel to multihandler
curl_multi_add_handle($mh, $channels[$key]);
}

// execute - if there is an active connection then keep looping
$active = null;
do {
$status = curl_multi_exec($mh, $active);
}
while ($active && $status == CURLM_OK);

// echo the content, remove the handlers, then close them
foreach ($channels as $chan) {
echo curl_multi_getcontent($chan);
curl_multi_remove_handle($mh, $chan);
curl_close($chan);
}

// close the multihandler
curl_multi_close($mh);

www.irctc.co.in之前添加https:// ,也需要启用此cURL参数。

CURLOPT_SSLVERIFYPEER => false

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM