Page 1 of 1
curl - php
Posted: Thu May 03, 2007 10:08 am
by rashmi
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.
Posted: Thu May 03, 2007 11:21 am
by feyd
Can you be a bit more specific about this "authanticate"?
Posted: Thu May 03, 2007 11:53 pm
by rashmi
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 my own code.
I used curl for this purpose.
if you have any idea about this problem solution please help me soon.
Posted: Fri May 18, 2007 6:22 pm
by reneeshtk
feyd | Please use 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
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]
Posted: Fri May 18, 2007 6:50 pm
by Ollie Saunders
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.
Code: Select all
$googleHomePage = file_get_contents('http://www.google.com');
You're going to have to parse them yourself though, but curl would never help you with that either.
Good luck.