<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<form method="post">
<input type="text" name="url" />
<input type="submit" value="submit" />
</form>
<?php
$strona = $_POST['url'];
if($_POST['url']!="") {
$useragent="Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1";
$rC = curl_init();
curl_setopt($rC, CURLOPT_HEADER, 1);
curl_setopt($rC, CURLOPT_COOKIEFILE, 'cookies.txt');
curl_setopt($rC, CURLOPT_COOKIEJAR, 'cookiesjar.txt');
curl_setopt($rC, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($rC, CURLOPT_VERBOSE, 0);
curl_setopt($rC, CURLOPT_REFERER, 'www.google.pl');
curl_setopt($rC, CURLOPT_URL, "$strona");
$wejscie = curl_exec($rC);
curl_setopt($rC, CURLOPT_REFERER, $strona);
$wejscie = curl_exec($rC);
curl_close($rC);
preg_match('/<div id=filmTitle class=hide>(.*)<\/div>/', $wejscie, $wyjscie);
}
?>
</body>
</html>
Znalazłem taki kod, ale dalej mam ten sam problem, proszę o pomoc.
Pozdrawiam