Scris: 05-Aug-2007, 23:48:47
irismaxima.xhost.ro. Dar cred ca renunt sa il salvez. In decembrie cand ma intorc in tara il sterg si il refac. Oricum vreau sa fac si un site pentru forum.
forumul phpBB in limba romana. Opinii, implementari, ajutor, instructiuni si download.
https://phpbb3.ro/community/
Cod: Selectaţi tot
<!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-Language" content="en-gb" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>PHP Function Test</title>
</head>
<body>
PHP mail() and fsockopen function test.
<p >
Send Mail check follows.. no error indicates it's working.</p>
<?php
// The message
$message = "Line 1\nLine 2\nLine 3";
// Send
mail('mailcheck@somecrappyfakedomainname.whatver.com', 'test subject', $message);
?>
<p>
FSOCKOPEN test follows: </p>
<p>
<b>
<?
echo get_url_title("http://news.bbc.co.uk");
function get_url_title($url, $timeout = 2)
{
$url = parse_url($url);
if(!in_array($url['scheme'],array('','http')))
return;
$fp = fsockopen ($url['host'], ($url['port'] > 0 ? $url['port'] : 80), $errno, $errstr, $timeout);
if (!$fp)
{
return;
// echo "$errstr ($errno)<br>\n";
}
else
{
fputs ($fp, "GET /".$url['path'].($url['query'] ? '?'.$url['query'] : '')." HTTP/1.0\r\nHost: ".$url['host']."\r\n\r\n");
$d = '';
while (!feof($fp))
{
$d .= fgets ($fp,2048);
if(preg_match('~(</head>|<body>|(<title>\s*(.*?)\s*</title>))~i', $d, $m))
break;
}
fclose ($fp);
return $m[3];
}
}
?>
</b>
</p>
<p></p>
<p></p>
FSOCKOPEN test ends. </p>
<p></p>
<p>PHP Info Follows:</p>
<p></p>
<p ><? phpinfo(); ?></p>
</body>
</html>