<h1>Tets!</h1>
<?php
$url = "http://www.reddit.com/";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$var= curl_exec($ch);
curl_close($ch);
$third= stripos($var,'<p class="title"><a class="title " ',0);
$fourth= stripos($var,'</span></p>',0);
//echo substr($var,$first,$second-$first);
echo substr($var,$third,$fourth-$third);
?>