Witam mam adres strony który po otworzeniu curlem chcę dalej modyfkowac i zapisywac wyniki do bazy. Jednak mam problem, curl nie pokazuje mi odpowidzi. prawdopodobnie zle mam cos w curlu, albo sie nie da.
oto adres url : http://www.bet365.com/home/inplayapi/FlashData.asp?lid=21&pd=%23AT%23B6%23X4740%23Y8%23
Po otwarciu go normalnie w przegladarce widac odpowiedź jaka daje serwer.
Po wsatwieniu do curla - nie mam odpowiedzi. albo moj hosting cos blokuje,
Możecie jakos pomóc? juz myslalem ze zaladowac w
$header[0] = "Accept: text/xml,application/xml,application/xhtml+xml,";
$header[0] .= "text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5";
$header[] = "Cache-Control: max-age=0";
$header[] = "Connection: keep-alive";
$header[] = "Keep-Alive: 300";
$header[] = "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7";
$header[] = "Accept-Language: en-us,en;q=0.5";
$header[] = "Pragma: no-cache"; // browsers keep this blank.
$ch = curl_init();
// Set some options - we are passing in a useragent too here
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_HEADER, 1);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, true );
curl_setopt( $ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20041001 Firefox/0.10.1" );
curl_setopt( $ch, CURLOPT_ENCODING, "" );
// Send the request & save response to $resp
$page = curl_exec($ch);
// Close request to clear up some resources
curl_close($ch);