cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Re: upper directory level notation

From: Eduardo Henrique Rocha <duzao_blues_at_hotmail.com>
Date: Sun, 07 Sep 2003 22:55:23 -0300



Daniel , Thanks for Your reply .

I've got that problem passed now ..

Instead of receiving the three frames i've got the post URL and was able to post

the url with curl but there is a new problem now.

 

First i do my authentication:

$ch = curl_init();
$ch1 = curl_init();

$fields = "txtUserId=userid&txtPassword=pass&txtTimeZone=25&txtNewPassword=&txtConfirmPassword=&txtDay=5&txtMonth=9&txtYear=2003&txtTime=21%3A16%3A37&txtCo_Clienttimezone=240&txtCommand=Problem&txtCo_ClientSTDtimezone=";
$fields1 = "strChangeId=222222";

curl_setopt($ch, CURLOPT_URL, "https://d02ntcl02/managenow/common/bin/files/wcls_co_loginverify.asp");
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)');  
curl_setopt($ch, CURLOPT_COOKIEFILE,'/srv/www/default/html/board/curltest/eduardor@managenow[1].txt');
curl_setopt($ch, CURLOPT_COOKIEJAR,'/srv/www/default/html/board/curltest/eduardor@managenow[1].txt');
curl_setopt($ch, CURLOPT_POST,0);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION,1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_POSTFIELDS,$fields);
$result = curl_exec($ch);

Then i request the url i need .

curl_setopt($ch2, CURLOPT_URL, "https://d02ntcl02/managenow/change/bin/files/wcls_ch_viewData.asp");
curl_setopt($ch1, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)');  
curl_setopt($ch1, CURLOPT_COOKIEFILE,'/srv/www/default/html/board/curltest/eduardor@managenow[1].txt');
curl_setopt($ch1, CURLOPT_COOKIEJAR,'/srv/www/default/html/board/curltest/eduardor@managenow[1].txt');
curl_setopt($ch1, CURLOPT_POST,0);
curl_setopt($ch1, CURLOPT_FOLLOWLOCATION,1);
curl_setopt($ch1, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch1, CURLOPT_POSTFIELDS,$fields1);
$result1 = curl_exec($ch1);

echo $result1;

curl_close($ch); 
curl_close($ch1); 

When i request the second URL it requests me to Relogin.

I think what the problem is , is that Different ASPSESSIONID are being used,

maybe something with the cookies.

 

Thanks once again

Eduardo Henrique Rocha

>From: Daniel Stenberg
>Reply-To: curl-and-php@lists.sourceforge.net
>To: curl and php list
>Subject: Re: upper directory level notation
>Date: Sun, 7 Sep 2003 16:30:29 +0200 (CEST)
>
>On Sun, 7 Sep 2003, Eduardo Henrique Rocha wrote:
>
> > I'm trying to get curl to capture the results of a ssl page for me . When
> > the url moves from the authentication url to the next one i have two
> > problems:
> >
> > 1) The second uses frames.
>
>I don't see how that is a curl problem.
>
> > 2) The url for the frames are not completelly filled it's something like
> >
> > ..\..\common\something.asp and this is causing Curl to look for the page
>
>Are they really using backslashes? If so, that's totally weird. URLs shall not
>contain backslashes and the above example is not a valid relative path.
>libcurl will not treat it as such either.
>
>How does the Location: header look like that curl receives?
>
> > in my local server instead of www.url.com\common\something
>
>Your local server?
>
>Can you please show us the output from a curl -v [URL], or possibly VERBOSE
>set to TRUE so that we can see what libcurl things and does on the headers it
>receives.
>
>--
> Daniel Stenberg -- curl: been grokking URLs since 1998
>
>
>-------------------------------------------------------
>This sf.net email is sponsored by:ThinkGeek
>Welcome to geek heaven.
>http://thinkgeek.com/sf
>


MSN Messenger: converse com os seus amigos online. Instale grátis. Clique aqui. ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf Received on 2003-09-08