I want to fetch names and address of all my friends from facebook and store it in my system, Can AnyOne tell me how this can be done with html, php or anything...I don't have any idea for this..

Recommended Answers

All 12 Replies

You would need to learn a scripting language. You'd need to learn how to use the Facebook API, parse JSON or XML and do database actions.

Can you provide me some useful links in order to do this with javascript..?

Javascript alone is not enough, you also need to learn a server-side scripting language (ASP, ASP.NET, Perl, PHP, etc).

Thanks for your replies..
Actually I have to store all details of lic agents in India. Link is lic india, I have my user id and password, but there are numbers of agents and its not possible to do it manually,I think that site doesn't have an api so I dont know how to do that. I have the basic idea of php and javascript, now can u please guide me in this direction ..

If the site has no API it will be much more difficult. You'd need to download the correct pages, and parse them to get to the right data. You'd need to know how to use cUrl, how to use XML for starters. Not really what I consider basic.

Apart from that, are you sure you are allowed to download that information for your own use?

here I am using Curl but its not solving the problem , I am unable to login the website..
here is the code :-

<?php
$username="username"; 
$password="password"; 
$url="http://onlinelic.in/LICEPS/Login/webLogin.do"; 
 echo "praveenpuglai";
$postdata = "portlet_5_6{actionForm.userName}=".$username."&portlet_5_6{actionForm.password}=".$password; 
$cookie = "nvx1PpyV8ppRTHyCj8FYLH3vTFmrSJrnyyJH87CKHQr3hZJnfM2h!355135090";
$ch = curl_init(); 
curl_setopt ($ch, CURLOPT_URL, $url); 
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20100101 Firefox/13.0");
curl_setopt($ch,CURLOPT_COOKIESESSION,true); 
curl_setopt ($ch, CURLOPT_TIMEOUT, 60); 
curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 0); 
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);  
curl_setopt ($ch, CURLOPT_REFERER, $url);
var_dump($ch); 
// curl_setopt ($ch, CURLOPT_COOKIEJAR, $cookie);
curl_setopt ($ch, CURLOPT_POSTFIELDS, $postdata); 
curl_setopt ($ch, CURLOPT_POST, 1); 
$result = curl_exec ($ch); 
 echo "praveenpuglai";
echo $result;
/*if($result != null)
{
  header('Location: http://onlinelic.in/LICEPS/appmanager/Customer/CustomerHome');  
} */ 
curl_close($ch);
?>

I think I am not continuing the session so cookies are not stored after this program is run..please check it and help me more..

It could be just the website blocking you.

How can I overcome that blockage...? I have my userid and password and using only that user id and password I have to log in.

I think I am not storing cookies information here..However I have used COOKIEJAR and $cookie should use information related to cookies, from where I can get the information.

Ask the owner of that website.

i am using curl code for login on facebook but unable to get user id and profile info..
pls tell me the code

Next time, please start a new discussion for your question, instead of replying to an unrelated one.

You should get your information from the Facebook API documentation. If you still have issues, please start a new discussion and include your code.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.