I am trying to create my own url preview. Like facebook shows. Dont want to use readymade script.
Here I go:
echo "<a href="; echo $url; echo"/>"; echo $title_display; echo "</a>"; //show url and title description
echo "</br>";
echo "<img src='"; echo $logo; echo "'height='84' width='66' >"; // shows image on the page
$content = plaintext($data);
$Preview = trim_display(100,$content); //to Show first 100 char of the web page as preview
echo $Preview;
echo " <a href="; echo $url; echo " target=_blank />"; echo "See More"; echo "</a>"; // See more link to go on that page
But here formatting is not appropriate.
How can I show entire things in one box whic contains.
first title desc and it's url i.e.
echo "<a href="; echo $url; echo"/>"; echo $title_display; echo "</a>"; //show url and title description
Below it Image on left side of box (can take div for that)
- Preview i.e. small 100 char description on right side of image.
Exactly same way as image preview shown by facebook when URL is entered.