Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-03-2010, 07:37 PM   PM User | #1
kevinkhan
Regular Coder

 
Join Date: Jun 2009
Posts: 350
Thanks: 75
Thanked 0 Times in 0 Posts
kevinkhan is an unknown quantity at this point
curl help please

can anybody explain the following lines of code please. im new to curl and desperately trying to learn it

PHP Code:
curl_setopt($curl_handleCURLOPT_HEADER0);
//curl_setopt($curl_handle, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($curl_handleCURLOPT_SSL_VERIFYPEERfalse);
curl_setopt($curl_handleCURLOPT_CAPATHSSL_CA_FILE);
curl_setopt($curl_handleCURLOPT_COOKIEJARCOOKIE_FILE);
curl_setopt($curl_handleCURLOPT_COOKIEFILECOOKIE_FILE);
curl_setopt($curl_handleCURLOPT_RETURNTRANSFER1);
curl_setopt($curl_handleCURLOPT_USERAGENT"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3");

//login to initialize cookies
curl_setopt($curl_handleCURLOPT_URL'https://login.facebook.com/login.php');
curl_setopt($curl_handleCURLOPT_POST1);
curl_setopt($curl_handleCURLOPT_POSTFIELDS$qryString);
$page curl_exec($curl_handle);

sleep(1);
unset(
$logInPage);

curl_setopt($curl_handleCURLOPT_URL'https://login.facebook.com/login.php');
curl_setopt($curl_handleCURLOPT_POST1);
curl_setopt($curl_handleCURLOPT_POSTFIELDS$qryString);
$page curl_exec($curl_handle);

unset(
$qryString);

// get home page
curl_setopt($curl_handleCURLOPT_POST0);
curl_setopt($curl_handleCURLOPT_URL'http://www.facebook.com/home.php');
$page curl_exec($curl_handle); 
kevinkhan is offline   Reply With Quote
Old 11-03-2010, 07:50 PM   PM User | #2
Rowsdower!
Senior Coder

 
Rowsdower!'s Avatar
 
Join Date: Oct 2008
Location: Some say it's everything.
Posts: 2,007
Thanks: 5
Thanked 395 Times in 388 Posts
Rowsdower! has a spectacular aura aboutRowsdower! has a spectacular aura aboutRowsdower! has a spectacular aura about
Which part is confusing you? Have you read the documentation?

http://us.php.net/manual/en/function.curl-setopt.php
http://us.php.net/manual/en/function.curl-exec.php

Let us know specifically where you're getting lost.
__________________
The object of opening the mind, as of opening the mouth, is to shut it again on something solid. –G.K. Chesterton
See Mediocrity in its Infancy
It's usually a good idea to start out with this at the VERY TOP of your CSS: * {border:0;margin:0;padding:0;}
Seek and you shall find... basically:
validate your markup | view your page cross-browser/cross-platform | free web tutorials | free hosting
Rowsdower! is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:59 PM.


Advertisement
Log in to turn off these ads.