Mian Shafiq-ur-Rehman | 3 Jun 2005 13:51

Login to Hotmail

Hello

I have been trying to login to hotmail but all in vain. Infact I was 
successfully doing that with hotmail's old login mechanism. Their new 
login mechanism redirects the pages with javascript.

if I turned FOLLOWLOCATION to true it does not redirects accordingly due 
to javascript form submission.

Please help

Regards

--

-- 
        \\\|///
      \\  - -  //
       (   <at>   <at>   )             PHP is too logical for my brain
+---oOOo-(_)-oOOo------------------------------------------+
|                Mian Shafiq ur Rehman
|                Sr. Software Engineer
|                210 A, Siddiq Trade Center,
|                Gulberg III, Lahore Pakistan
|
| Mobile:        0300 423 9385
| Office:        042 578 1728
|   ooo0         http://www.phpgurru.com
|  (    )   0ooo E-Mail: rehmanms <at> gmail.com
+---\  (----(   )------------------------------------------+
      \_)    ) /
             (_/
(Continue reading)

Dan O. | 8 Jun 2005 04:32
Picon
Favicon

RE: Login to Hotmail


** [cURL] does not redirects accordingly due to javascript form submission. **

If JavaScript being used (I don't know that myself, I'm just going by your statement), no it won't. cURL
doesn't do JavaScript.

You'd have to programmatically parse the page, derive the redirect URL and the post/get variables from the
code on the page and then execute a second page fetch using the URL (and other form information) which was on
the first page. 

cURL will not help with any of that (other than fetching the pages themselves) I'm afraid. You'll have to
supply the information (URL and form field values) for cURL to use.

Dan O.

 --- On Sat 06/04,  < curl-and-php-request <at> cool.haxx.se > wrote:
From:  [mailto: curl-and-php-request <at> cool.haxx.se]
To: curl-and-php <at> cool.haxx.se
Date: Sat, 4 Jun 2005 12:00:10 +0200
Subject: curl-and-php Digest, Vol 17, Issue 1

Hello

I have been trying to login to hotmail but all in vain. Infact I was 
successfully doing that with hotmail's old login mechanism. Their new 
login mechanism redirects the pages with javascript.

if I turned FOLLOWLOCATION to true it does not redirects accordingly due to javascript form submission.

Please help
(Continue reading)

Jonathan Bartlett | 16 Jun 2005 18:47

https and reverse DNS

While connecting to an https address, it seems that curl (or possibly 
openssl) is doing a reverse lookup on the destination IP address.  This 
is causing huge delays when connecting to UPS.  Anyone know how to turn 
this off either on cURL or OpenSSL?

Thanks,

Jonathan Bartlett

Daniel Stenberg | 16 Jun 2005 23:14
Picon
Favicon

Re: https and reverse DNS

On Thu, 16 Jun 2005, Jonathan Bartlett wrote:

> While connecting to an https address, it seems that curl (or possibly 
> openssl) is doing a reverse lookup on the destination IP address.  This is 
> causing huge delays when connecting to UPS.  Anyone know how to turn this 
> off either on cURL or OpenSSL?

Upgrade your libcurl.

--

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html

Arthur Bickle | 17 Jun 2005 19:56
Picon

Help with curl

Hello, Does anyone know if there is a way to parse and alter the information coming from

the website before it is sent to the browser?

 

<?

$url=”http://www.anydomain.com;

 

$ch= curl_init($url);
if(!$ch)
die(sprintf('Error [%d]: %s', curl_errno($ch), curl_error($ch)));

$data=curl_exec($ch);
if(!$data){
die(sprintf('Error [%d]: %s', curl_errno($ch), curl_error($ch)));

}

curl_close ($ch)

 

?>

 

Thanks

art


--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.7.4/16 - Release Date: 6/15/2005

Steve Yeazel | 17 Jun 2005 20:37

Re: Help with curl

On Fri, 17 Jun 2005 12:56:56 -0500, Arthur Bickle <abickle <at> gmail.com>  
wrote:

> Hello, Does anyone know if there is a way to parse and alter the  
> information
> coming from
>
> the website before it is sent to the browser?
>
>
>
> Thanks
>
> art
>

Not really sure what you are asking.  Nothing gets sent to the browser  
until you tell it to so do your processing and then echo to the  
browser....you need to be much more specific in your question if you want  
a decent answer (escpecially on this list)

lobos | 17 Jun 2005 21:28

Re: Help with curl

If you don't have control of the data from the origin you could use regular expressions to alter it.
----- Original Message -----
Sent: Friday, June 17, 2005 2:56 PM
Subject: Help with curl

Hello, Does anyone know if there is a way to parse and alter the information coming from

the website before it is sent to the browser?

 

<?

$url=”http://www.anydomain.com;

 

$ch= curl_init($url);
if(!$ch)
die(sprintf('Error [%d]: %s', curl_errno($ch), curl_error($ch)));

$data=curl_exec($ch);
if(!$data){
die(sprintf('Error [%d]: %s', curl_errno($ch), curl_error($ch)));

}

curl_close ($ch)

 

?>

 

Thanks

art


--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.7.4/16 - Release Date: 6/15/2005

Colin Petit | 18 Jun 2005 03:09

Re: Help with curl

If you set CURLOPT_RETURNTRANSFER you can store the data in a variable and then alter it, otherwise it goes straight to the browser.  Try this:

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$data = curl_exec($ch);
curl_close($ch);
Stephen Heath | 20 Jun 2005 23:02

Sorry, I'm a newb, but I can't figure this out.

I downloaded the 7.13 version of cURL although PHP tells me it’s 7.11.2.  I am trying to access a secure site and am having two problems.

 

The first is that the “pictures” on the page are resolving to my website address (www.anashtravel.com, where I am launching the script from while testing – when I get it working I’ll do it command line mode) instead of the target address www3.moneris.com.  I’m not sure why, and figure it may be related to the next problem I am having.

 

I can get through the login, and send all the information to post a sale and hit the process button, but the website rejects it saying API token mismatch.  I suspect I need to have some kind of redirector and some kind of token-capture turned on, but I can’t figure out what they are even called to begin finding the information I need, so any help would be greatly appreciated.

 

Script follows:

 

 

 

<?php

   $url="https://www3.moneris.com/mpg/terminal/purchase/index.php";

   $params = "name=####&store_id=####&password=####&orderid=Test2&CreditCard=373387015331002&DateExpires=0408&Amount=1.00&cust_id=TEST&ctype=1&auth=Process";

   $ch = curl_init();

   curl_setopt($ch, CURLOPT_POST,1);

   curl_setopt($ch, CURLOPT_POSTFIELDS,$params);

   curl_setopt($ch, CURLOPT_URL,$url);

   curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,  2);

   curl_setopt($ch, CURLOPT_USERAGENT, $defined_vars['HTTP_USER_AGENT']);

   curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);

   curl_setopt($ch, CURLOPT_CAINFO, 'c:\curl\curl-ca-bundle.crt');

   $result=curl_exec ($ch);

   curl_close ($ch);

            echo ($result);

            exit;

 

?>

Steve Yeazel | 20 Jun 2005 23:57

Re: Sorry, I'm a newb, but I can't figure this out.

On Mon, 20 Jun 2005 16:02:37 -0500, Stephen Heath <steve <at> anashtravel.com>  
wrote:

> I downloaded the 7.13 version of cURL although PHP tells me it's  
> 7.11.2.  I

then you haven't installed correctly...

> I can get through the login, and send all the information to post a sale  
> and
> hit the process button, but the website rejects it saying API token
> mismatch.  I suspect I need to have some kind of redirector and some  
> kind of
> token-capture turned on, but I can't figure out what they are even  
> called to
> begin finding the information I need, so any help would be greatly
> appreciated.
>

if you are getting "API" errors then you need to look at the API docs. for  
your payment gateway.  What does it say regarding tokens?


Gmane