Facebook Like URL data Extract Using jQuery PHP and Ajax

You have seen in Facebook, that how we give a url and it extract data such as images, title and description. Here now you can get this amazing script at 99Points. You have seen amazing and popular facebook style tutorials which can help you to get some amazing effects on your websites. I have created this awesome tutorial which is 99% same as facebook style. Check the demo and download the source code.
JQuery Code
// 0)
{
firstimage = parseInt(firstimage)-parseInt(1);
$('#cur_image').val(firstimage);
$('img#'+firstimage).show();
}
});
// watermark input fields
jQuery(function($){
$("#url").Watermark("http://");
});
jQuery(function($){
$("#url").Watermark("watermark","#369");
});
function UseData(){
$.Watermark.HideAll();
$.Watermark.ShowAll();
}
});
function isValidURL(url){
var RegExp = /(ftp|http|https)://(w+:{0,1}w*@)?(S+)(:[0-9]+)?(/|/([w#!:.?+=&%@!-/]))?/;
if(RegExp.test(url)){
return true;
}else{
return false;
}
}
// ]]>
index.php
Link
If you Like this Tutorial and Want to get New Tutorials news by Email, Then Subscribe Here.
fetch.php
I have get images and title using fopen method of php but for description I used get_meta_tags() function which returns meta tags of url. After getting all images I just put a loop and get all images which size is greater than 100px so that small images should not be included. I have created this tutorial separate from our facebook style wall posting and comment application and facebook profile edit. However if you want to add this functionality in that script just download all files and add your code.
(.+)/i";
preg_match_all($title_regex, $string, $title, PREG_PATTERN_ORDER);
$url_title = $title[1];
/// fecth decription
$tags = get_meta_tags($url);
// fetch images
$image_regex = '/
]*'.'src=["|'](.*)["|']/Ui';
preg_match_all($image_regex, $string, $img, PREG_PATTERN_ORDER);
$images_array = $img[1];
?>
= 50 && $height >= 50 ){
echo "
";
$k++;
}
}
}
}
?>
Download all files and use this awesome tutorial.
87 to “Facebook Like URL data Extract Using jQuery PHP and Ajax”
Post comment

Categories
- AJAX (28)
- Announcement (3)
- Blogging Tips (1)
- Codeigniter (16)
- CSS (14)
- Facebook (8)
- Freelance Tips (1)
- How-To (2)
- Joomla (1)
- JQuery (51)
- Miscellaneous (3)
- Mootools (1)
- MySQL (3)
- PHP (57)
- SEO (2)
- Technology (6)
- Tutorials (17)
- Twitter (2)
- Web Design (26)
- Web Development (58)
- WordPress (3)
Popular post
- 46 Highly Responsive Admin Templates for Your Websites
- $50 PayPal Cash & 5 Premium PHP Wall Script Prizes #Giveaway
- PHP Wall Script Clone with Real Time Features __ January 2013 Release __
- Things you should know if you are a Blogger
- Top 10 Must Have Qualities of a Freelance Web Developer
- Fundamental Factors for Mobile Compatible eCommerce Hosting
- Facebook Wall Script New Version in September 2012
Recommend


its not showing images of most websites,, and even not taking long urls like…
http://www.indorichatora.com/dominos-indore-R25
Facebook Like URL data Extract Using jQuery PHP and Ajax…
You have seen amazing and popular facebook style tutorials which can help you to get some amazing effects on your websites. Check the demo and download the source code….
Hi. As usual, great.
I’m having a problem.
can not get the picture. taking unnecessary pictures. how should I do to fix it
17 pictures find search results.
when I click on forward or back to show only the first 2 of them. Is this a bug
Hi!
This is my Version of this wonderful Script:
Download: http://www.screamlabs.at/dev/fetch/fetch.zip
Demo: http://www.screamlabs.at/dev/fetch/
Changes:
Fetch with CURL and Fake UserAgent (Some ISPs not accept Standard PHP UserAgent from fopen or what ever)
Image Fetch Bugfix: array_unique Picture. The Same Image will not show twice or more.
Next Prev Bug fixed: If you have 13 Images after 13 comes 1 and behind
1 comes 13..
Video Portal AddOn: Put the URL from a YouTube, MySpace, MyVideo Video in the Adress ROw and the Video will be Embedded after the Description and Images.
After you click the Share Button, all needed Variables will be shown.
Lang is German!
MfG
nice work Johannes
Johannes, I tried to open your links, but it didn’t work.
Sehr was down for a while
ZeeShaN i really really like your scripts but i also find them well.. unsuccessfull, example this one doesn’t find the images on my website.. so it’s like not done.. it extract title and description but not images.. i’m currently editing the code for to find images, and will upload a solution soon
but they work like 70-80% all of them and just need a little of editing
Thanks Jonas.
I always tried to give some very best idea or work to the readers but I apologize that there are always some mistakes you should fix. My main focus is to provide a unique or some thing very useful so polishing is not big issue. And I think smart people like you can fix those mistakes
hi, i have a problem with opening next button, prev button. Image, title, url, description, and total image is showing but next and prev button is no showing.
Is there any mistake with my code?
I am using your code.
Thanks.
Hi, what should I do if I want to post the extracted data on my “wall”?
how to make loader faster?
if i compare what i’ve made and facebook. Facebook is fast when load the page. is there any suggestion how to make it fast?
Great thing buddy… how can I attach it to WordPress theme P2 ?? Please reply soon..
Very Informative post. Thanks for posting such content
The demo grabs some data.. but when I upload the files.. the script seems to just churn (both IE and FF).
Hi!
Images can not find me. Ideas?
Sorry, my bad english.
How do I add this to your facebook wall posts script, also, how do I send/store the returned json data into my msql database from the wall posting script??.
Hi Andrew,
you can add this to any page if you know working in jquery. You can just integrate it into there and storing the returned data into same table where you are storing posting of wall.
Hi, Great work. Thanks for the code.. I would like to know how to get URL content like say a news displayed
The demo is not workning not in chrome or mozila
Could you supply a script on how to integrate this into the ‘wall’ script and store data into Mysql through Php as I am new to this web-design scene and I have found All your tutorials Most Helpful so far, just stuck with the ‘integration into the ‘wall’ script’, yours most thankfully
get a better webhost and server? I assume the lag is caused by processing power required to curl the site and possible lag when downloading it. I too have this issue.
My script also failed when the total_count of images was above 9 I had to add:
to ensure the whole number was read correctly
you also dont need the .livequery extension anymore either the builtin .live works great for me.
other than that thanks for such a great post!
Yes you are right.
Its very helpful. But in Facebook, what is does is when user paste URL in text-area it will automatically extract url data and display it in div. How can we do like this in our project?
Another issue i got stuck is when user type url in text area and when user press space facebook will extract url details. how can we do this also? Is there any new updates guys for this?
Thanks for the codes. If you want to see this in .Net, take a look at this open-source project:
http://nalgorithm.wordpress.com/2011/12/05/embedded-url-representation/
It is actually a class library, which is called by an MVC application client by using JQuery and its AJAX features.
Your code not work.
[...] Facebook Like URL data Extract Using jQuery PHP and Ajax | 99Points – Posted in Delicious Link [...]
The script demo don’t work with http://www.youtube.com/watch?v=wD0uSi3UHa0 … is it possible ?!
me too
This tutorial is great buddy and working properly but not extracting images ….whats should be the reasons…..and thanx for this post
Plz suggest that How to integrate this in Elgg platform?
j aime
[...] View Tutorial [...]
Hi,
I’m having this problem
Warning: fopen() [function.fopen]: URL file-access is disabled in the server configuration in /homepages/32/d360985694/htdocs/fetching/fetch.php on line 21
Warning: fopen(http://www.youtube.com/watch?v=safDq9acVrk) [function.fopen]: failed to open stream: no suitable wrapper could be found in /homepages/32/d360985694/htdocs/fetching/fetch.php on line 21
How can I fix this error,
I’d be really please if you could tell me, thanks in advance!!!
Thanks a lot, very useful, but some bugs should be fixed