Vishwanath | 4 Jun 2010 13:31
Picon

Dear Curl-And-Php, If you can't find in google, try JUSTDIAL.COM

Dear Curl-And-Php,

I strongly recommend this website www.justdial.com. It's a world class local search service & I've always found anything I've ever wanted.

You can find info on any company, product, or service in over 240 cities in India.

You can also call them up 24x7, on phone (69999999), a local call in 240 Indian cities.

Ask for anything, you'll get the info on the phone and/ or by SMS within 30 secs, and this service is at no cost!

For a change, it's an original Indian idea and an Indian company with world class service, and with a vision to spread all over the world.

Be a proud Indian and forward this to every Indian you know.

Best Wishes,
Vishwanath


Click Here to unsubscribe.
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Vishwanath | 7 Jun 2010 07:28

Hey Curl-And-Php, I forgot to mention...

Dear Curl-And-Php,

Oops!! I forgot to invite you to Just Dial's Lucky Referrer Contest.

The last month's winners have won Samsung-LCD TV, Viao Laptop, Nokia phone and Ipods.

Why don't you give it a shot? It took me just 2 minutes to play.

You could be the next winner. Please click on the link www.justdial.com/contest.

Best of Luck,
Vishwanath


Click Here to unsubscribe.
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Robert Sawko | 9 Jun 2010 09:58
Picon

Encoded URL login and website interaction

Dear All,

would you please advise me me upon a cURL/PHP login script? I have
seen quite a few similar posts in many areas of the Internet but I
could not find an answer. Possibly, due to my unacceptable ignorance
in the arts of HTTP/PHP so please assume only very basic knowledge on
my part. Anyway, if you believe this post is repetitive I would be
obliged for references.

My ultimate goal is to prepare a script that would renew my loans from
the library. Some of the books are week only loans but library web
page provides a way of renewing. The library still sends a recall
message if somebody else requests a book. I simply don't want to renew
the books every week.

I looked at some of your script and modified it so that eventually
came out with a version that I attach with this e-mail.

My main concern is that the output is identical if I give wrong
credentials. How can I move from this point? How do I deal with
session id? The location of the login script is also encoded and
changes every time enter the website. Do I have to take this into
account?

I also attach the headers that I capture when I login. Note the random
characters in URL. I would greatly appreciate any comments, hints or
references.

Best wishes,
Robert
Attachment (renew_headers): application/octet-stream, 1412 bytes
Attachment (script): application/octet-stream, 6791 bytes
Attachment (login_headers): application/octet-stream, 1427 bytes
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Thai | 18 Jun 2010 16:05
Picon

SSL certificate problem, verify that the CA cert is OK.

Hi All,

OK - first of all, I know this is a common problem.
I have read http://curl.haxx.se/docs/sslcerts.html a million times and done everything in it.
I've also read the FAQ and spent about 10 hours on this problem.
So please, do not flame me before even reading this!  ;^)

My set up :
  * Apache 2.2.15
  * PHP55.2.13
  * openSSL 0.9.8
  * OS WinXP
  * HTTPS is working on my server

My problem:
Getting the following error when using cURL with HTTPS

"SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed (Error No. 60)"

What I have done so far:
1. I have downloaded the correct cacert.pem
2. Updated my ssl.conf to state:
SSLCACertificatePath "C:/Apache2.2/conf/ssl/"
SSLCACertificateFile "C:/Apache2.2/conf/ssl/cacert.pem"
So I'm pointing SSL to use the correct CA Cert file.
Restarted my server, but still am getting above error.

When I use:
curl_setopt($ch, CURLOPT_CAINFO, "c:/apache2.2/conf/ssl/cacert.pem");

In the code, I do not get the error - so that cacert.pem is obviously the right one.

The PHP modules I am using are not coded by me and I don't want to change the code at all.
I just want to be able to set up the server so that whenever cURL does the peer SSL check then it reads the correct CA Cert as defined in the ssl.conf.
But it doesn't seem to.

There must be something that I am missing in the configuration, but not sure what else there is.
I've read all the walkthroughs and FAQs and crib notes.. how do I get curl to look at the right cacert.pem without hard coding it in?



Thanks so much for your help in advance!



Ty

_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Sony AK | 29 Jun 2010 10:58
Gravatar

curl on aspx with https

Dear curl fans,

I have curl code that login to an ASPX site. I am trying to run on my
local machine and run succesfuly (can logged in succesfuly), but then
I upload to GoDaddy and cannot run :( I upload to other hosting than
GoDaddy and still cannot run. Any ideas?

Here is the code.

--------------- cut here ------------------

  // do login
  $curl = curl_init();
  curl_setopt($curl, CURLOPT_URL, "https://server.there.com/login.aspx");
  curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
  curl_setopt($curl, CURLOPT_REFERER, "https://server.there.com/login.aspx");
  curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
  curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
  curl_setopt($curl, CURLOPT_POST, 1);
  curl_setopt($curl, CURLOPT_POSTFIELDS, "__LASTFOCUS=" . $lastFocus .
"&__EVENTTARGET=" . $eventTarget . "&__EVENTARGUMENT=" .
$eventArgument . "&__VIEWSTATE=" . urlencode($viewState) .
"&__EVENTVALIDATION=" . urlencode($eventValidation));
  curl_setopt($curl, CURLOPT_ENCODING, "");
  curl_setopt($curl, CURLOPT_COOKIEFILE, getcwd() . '/cookies_temp.cookie');
  curl_setopt($curl, CURLOPT_COOKIEJAR, getcwd() . '/cookies_temp.cookie');
  curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U;
Windows NT 6.0; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6 (.NET CLR
3.5.30729)");
  $curlData = curl_exec($curl);
  curl_close($curl);

------------ cut here -----------------

Best regards,
Sony AK
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php

shiplu | 29 Jun 2010 19:47
Picon
Gravatar

Re: curl on aspx with https

It runs on your local machine but doesn't run on godaddy's server.
So, Do you get any error message when you try to run it on godaddy's server?
Did you check the configuration specific differences between your
local machine and the server?

Shiplu Mokadd.im
My talks, http://talk.cmyweb.net
Follow me, http://twitter.com/shiplu
SUST Programmers, http://groups.google.com/group/p2psust
Innovation distinguishes bet ... ... (ask Steve Jobs the rest)
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php

David Colter | 29 Jun 2010 23:05
Picon
Favicon

Re: curl on aspx with https

Sony,

I am trying to run on my
local machine and run succesfuly (can logged in succesfuly), but then
I upload to GoDaddy

I have had many difficulties with 'followlocation' on a hosted site. There are settings in php.ini that
prevent a script from following.  

You might also use verbose to help find where the process is hanging.
$fp = fopen ( $verbose_file, 'w+' );  // with permission 666
curl_setopt ( $curl, curlopt_verbose, true );
curl_setopt ( $curl, curlopt_stderr, $fp );

David

Sent from my iPhone 3G

_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php


Gmane