If anyone know how to use curl to fetch page content from authanticate url please guide me. It's urgent.
My requirement :
I am in try to develop address book importer in php.
address book importer from webmail yahoo, msn, gmail.. etc available on net.
But I want to develope same for others by myself.
I used curl for this purpose.
if you have any idea about this problem solution please help me soon.
Thanks for reply n guidence.
curl - php
Moderator: General Moderators
curl - php
Last edited by rashmi on Mon May 21, 2007 11:42 pm, edited 1 time in total.
feyd | Please use
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hi
There is one method using cURL you can do it...Code: Select all
$curl="abc.com";
//curl_headdata contains the fields of the form
$curl_headdata="SLD=$domainame&TLD=$tlds&submit=submit";
$curlconn = curl_init();
curl_setopt($curlconn, CURLOPT_POST, true);
curl_setopt($curlconn, CURLOPT_POSTFIELDS, "$curl_headata");
curl_setopt($curlconn, CURLOPT_URL, $curl_url);
curl_setopt($curlconn, CURLOPT_RETURNTRANSFER, true);
$curlresult = curl_exec($curlconn);
echo $crulresult;feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]- Ollie Saunders
- DevNet Master
- Posts: 3179
- Joined: Tue May 24, 2005 6:01 pm
- Location: UK
You probably don't even need curl. Have a little look at fopen() or file_get_contents() and you will see that you can use any number of protocols.... this means you can fetch remote files with just the URL.You're going to have to parse them yourself though, but curl would never help you with that either.
Good luck.
Code: Select all
$googleHomePage = file_get_contents('http://www.google.com');Good luck.