Sen kendi sunucusu www.bata.com.sg çözemezse neden anlamaya Site5 müşteri destek konuşmak gerek
Eğer onlardan bir cevap alana kadar, aşağıdaki kodu deneyin.
Anahtar noktalar
- 194.228.50.32 - Bu IP adresi www.bata.com.sg bağlanmak için çözümler
- Www.bata.com.sg başlık: Sonra Sunucu gönderir
Curl o adresi çözebilecek olurdu sanki Özünde, aynı şekilde çalışır.
<?php
// this is the IP address that www.bata.com.sg resolves to
$server = '194.228.50.32';
$host = 'www.bata.com.sg';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $server);
/* set the user agent - might help, doesn't hurt */
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)');
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
/* try to follow redirects */
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
/* timeout after the specified number of seconds. assuming that this script runs
on a server, 20 seconds should be plenty of time to verify a valid URL. */
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 15);
curl_setopt($ch, CURLOPT_TIMEOUT, 20);
$headers = array();
$headers[] = "Host: $host";
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
curl_setopt($ch, CURLOPT_VERBOSE, true);
/* don't download the page, just the header (much faster in this case) */
curl_setopt($ch, CURLOPT_NOBODY, true);
curl_setopt($ch, CURLOPT_HEADER, true);
$response = curl_exec($ch);
curl_close($ch);
var_dump($response);