hi all, i am new to php. i want know about how to import contacts from yahoomail,gmail, orkut, facebook, xing,..........like. if anybody know about these. help me. share with me. ........

Dani AI

Generated

Short answer: avoid credential‑grabbers and use each provider’s official API + OAuth or a CSV/vCard import. Many replies here (for example , and ) point to ready-made scripts, but those tools often rely on scraping or asking for account passwords, which is insecure and fragile; the modern approach is to register an app and use the provider APIs (Google uses the People API for contacts). (developers.google.com)

Common debug notes from this thread (addresses and ):

  • “Call to undefined function curl_init()” = PHP’s cURL extension is not enabled/installed. Enable it in php.ini on Windows or install the php-curl package on Linux, then restart the web server. (php.net)
  • opendir warnings usually mean the target folder does not exist, the path is wrong, or permissions prevent access. Use absolute paths or DIR and check/create the folder before opening it. (php.net)

Quick safe snippet to avoid those errors:

$dir = __DIR__ . '/csvUpload';
if (!is_dir($dir)) {
    mkdir($dir, 0755, true);
}
if (!function_exists('curl_init')) {
    die('Enable PHP cURL (edit php.ini or install php-curl) and restart the web server.');
}

Provider-specific constraints: Facebook’s Graph API no longer returns a user’s full friend list — only friends who have also authorized your app — so expecting a wholesale friend dump will fail; use invite dialogs or taggable/invitable endpoints where appropriate and follow app‑review rules. Orkut is long retired and is not a viable target. (stackoverflow.com)

Practical checklist to implement: create app credentials, implement OAuth 2.0, request the minimum scopes (contacts-only), show a clear privacy policy and consent screen, parse API contact results, and offer a CSV upload fallback. Do not store raw passwords and follow each provider’s developer and data‑use policies.

Recommended Answers

All 12 Replies

hi all, i am new to php. i want know about how to import contacts from yahoomail,gmail, orkut, facebook, xing,..........like. if anybody know about these. help me. share with me. ........

you need some external script like

you need some external script like

i tried download sript. but they need some external plugins . is there any orhterway ........

i tried download sript. but they need some external plugins . is there any orhterway ........

try this, most of the script i found were not freeware though

<?ob_start();
$dir = 'csvUpload';
$dp = opendir($dir) or die ('Fatal Error: ');
while ($file = readdir($dp)) {
if ((eregi('.csv',$file)) && (filemtime($dir."/".$file)) <
(strtotime('yesterday'))) {
			//(filemtime($dir."/".$file))." ".strtotime("yesterday")."<br>";
			$del=@unlink($dir."/".$file);
			
	            }
         }
?>

getting error like

Warning: opendir(csvUpload) [function.opendir]: failed to open dir: Invalid argument in C:\wamp\www\grabber\grabber\index.php on line 28
Fatal Error:

try this, most of the script i found were not freeware though

i excuted one script. i got

Fatal error: Call to undefined function curl_init() in C:\wamp\www\exampls\import\gmail.demo.09.29.2009\scripts\gmail.php on line 35

these error what is it.

you need some external script like

i download script from above link and i am trying excute but i am geting

Warning: opendir(csvUpload) [function.opendir]: failed to open dir: Invalid argument in C:\wamp\www\exampls\contactgrabber_0.3\index.php on line 28
Fatal Error:

.
these error . in downloaded there is no csvUpload floder.

there's nothing as such to handle, if there is no such folder, instead you can handle it or just use the die()

Hello, there

You need external script for grabbing contact . i sending you one site please download script form it and do modification as per required.

If any issues you have during customisation let me know because i already used this script and its work fine foe me.

link : http://openinviter.com/

Best luck !!!

hi all, i am new to php. i want know about how to import contacts from yahoomail,gmail, orkut, facebook, xing,..........like. if anybody know about these. help me. share with me. ........

chk this: http://openinviter.com/index.php

Member Avatar for Member #334542

Using Json you can refer all the friends and online members of facebook. for more details you can check with facebook developer wiki and guides.

i searched a script for facebook friends display in my webpage with photos? you have any idea about that?

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.