lakshmipriya prabhu | 2 Oct 2006 19:43
Picon
Favicon

curl error : 52 - help

 
Hi,
 
Please provide any help on below problem.
 
Problem :
-----------
 
Please find attached the log trace for the steps through "Browser" and same through "PHP+libcurl" scripts and also the "libcurl script" for this.
Below error occurs during the php-libcurl scripts execution.I am able to login to the website perform all following actions ("GET"/"POST")until the below step where i get this error.

Details of the Error:
======================
 
cURL error number :52   
cURL error:error  Empty reply from server* Closing connection #0    { which means, "Nothing was returned from the server "}
As seen in the attached trace :-
 
1) The Request is same as Browser Request
2) There is a correct redirection by server to “GET”  "https://abc.def.ghi/ABC/Upload.asp?pqr=2"
 
But instead of “Getting https://abc.def.ghi/ABC/Upload.asp?pqr=2” there is error as mentioned above
a)Is it because web browsers always work slower than the curl?
b)Is it that test.php takes longer time to run and the curl process returns before it finishes?
  If so, how can we delay the curl execution-time?
c)Is it a problem at server - end? unfortunately, i donot have access to the server logs.

Please provide any help / suggestion if someone had this problem.
Thanks in advance,
LP
 
Here's the 'Script' :
--------------------

echo " ENTER #######";
  
 //POSTING to https://abc.def.ghi/ABC/Upload.asp?pqr=1
 $URL = "https://abc.def.ghi/ABC/Upload.asp?pqr=1"; 
 $reffer ="https://abc.def.ghi/ABC/Upload.asp?frompage=fromaspnet.asp"; 
 $POSTFIELDS="txtLines=0&optType=1&Delimiter=%2C&txtDelimiter=&Qualifier=%22&txtQualifier=&cmdSubmit.x=54&cmdSubmit.y=20";
 $ch = curl_init();
 curl_setopt($ch, CURLOPT_SSLVERSION,2);
 curl_setopt($ch, CURLOPT_URL,$URL);
 curl_setopt($ch, CURLOPT_VERBOSE, 1);
 curl_setopt($ch, CURLOPT_USERAGENT, $agent);
 curl_setopt($ch, CURLOPT_POST, 1);
 curl_setopt($ch, CURLOPT_POSTFIELDS,$POSTFIELDS);
 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
 curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
 curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
 curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
 curl_setopt($ch, CURLOPT_REFERER, $reffer);
 curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file_path);
 curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file_path);
 
   
 //output to file
 $fp = fopen ($file, "w");
 curl_setopt ($ch , CURLOPT_FILE, $fp);
  
 //execute
 $result =curl_exec ($ch );
 // print errors
 print_r(curl_getinfo($ch)); 
 echo "\n\ncURL error number:" .curl_errno($ch); 
 echo "\n\ncURL error:" . curl_error($ch); 
 //close resources
 curl_close ($ch );
        fclose ($fp);
echo "EXIT #######";
Here's the 'Trace' :
--------------------

==========   BROWSER  TRACE ===========================
POST /ABC/Upload.asp?pqr=1 HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, application/x-shockwave-flash, */*
Referer: https://abc.def.ghi/ABC/Upload.asp?frompage=fromaspnet.asp
Accept-Language: en-us
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Host: abc.def.ghi
Content-Length: 124
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: ASP.NET_SessionId=oqsrg0fzyi04l255yludwi55; ASPSESSIONIDQQQBBDAQ=FJMFABKCPBLBDKEJDOACACMC
txtLines=0&optType=1&Delimiter=%2C&txtDelimiter=&Qualifier=%22&txtQualifier=&cmdSubmit.x=54&cmdSubmit.y=20
HTTP/1.1 302 Object moved
Connection: close
Date: Fri, 29 Sep 2006 22:36:04 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
Location: Upload.asp?pqr=2
Content-Length: 144
Content-Type: text/html
Cache-control: private
<head><title>Object moved</title></head>
<body><h1>Object Moved</h1>This object may be found <a HREF="Upload.asp?pqr=2">here</a>.</body>
==========   BROWSER  TRACE ==========================
##############################################################################################
 
**********   LIBCURL(SCRIPTS) TRACE **************************************
 ENTER STEP #######*
About to connect() to abc.def.ghi port 443
*   Trying 167.196.94.203... * connected
* Connected to abc.def.ghi (aaa.bbb.cc.ddd) port 443
* SSL connection using DES-CBC3-MD5
> POST /ABC/Upload.asp?pqr=1 HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1
.4322)
Host: abc.def.ghi
Accept: */*
Referer: https://abc.def.ghi/ABC/Upload.asp?frompage=fromaspnet.asp
Cookie: ASPSESSIONIDQQQBBDAQ=KJMFABKCLGPICEBANFDBLFCH; ASP.NET_SessionId=isliqa4
5maky2hejbpr1tw55
Content-Length: 124
Content-Type: application/x-www-form-urlencoded
txtLines=0&optType=1&Delimiter=%2C&txtDelimiter=&Qualifier=%22&txtQualifier=&cmdSubmit.x=54&cmdSubmit.y=20< HTTP/1.1 302 Object moved
< Connection: close
< Date: Sat, 30 Sep 2006 00:04:18 GMT
< Server: Microsoft-IIS/6.0
< X-Powered-By: ASP.NET
< Location: Upload.asp?pqr=2
< Content-Length: 144
< Content-Type: text/html
< Cache-control: private
* Closing connection #0
* Issue another request to this URL: 'https://abc.def.ghi/ABC/Upload.asp?pqr=2'
* Disables POST, goes with GET
* About to connect() to abc.def.ghi port 443
*   Trying aaa.bbb.cc.ddd... * connected
* Connected to abc.def.ghi (aaa.bbb.cc.ddd) port 443
* SSL re-using session ID
* SSL connection using DES-CBC3-MD5
> GET /ABC/Upload.asp?pqr=2 HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1
.4322)
Host: abc.def.ghi
Accept: */*
Referer: https://abc.def.ghi/ABC/Upload.asp?frompage=fromaspnet.asp
Cookie: ASPSESSIONIDQQQBBDAQ=KJMFABKCLGPICEBANFDBLFCH; ASP.NET_SessionId=isliqa4
5maky2hejbpr1tw55
* Empty reply from server
* Connection #0 to host abc.def.ghi left intact
Array
(
    [url] => https://abc.def.ghi/ABC/Upload.asp?pqr=2
    [content_type] => text/html
    [http_code] => 302
    [header_size] => 240
    [request_size] => 905
    [filetime] => -1
    [ssl_verify_result] => 20
    [redirect_count] => 1
    [total_time] => 1.422
    [namelookup_time] => 0
    [connect_time] => 0.094
    [pretransfer_time] => 0.281
    [size_upload] => 0
    [size_download] => 0
    [speed_download] => 0
    [speed_upload] => 0
    [download_content_length] => 144
    [upload_content_length] => 0
    [starttransfer_time] => 0.5
    [redirect_time] => 0.922
)

cURL error number:52
cURL error:Empty reply from server* Closing connection #0
EXIT STEP  #######
**********   LIBCURL TRACE **************************************

 

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Daniel Stenberg | 2 Oct 2006 21:47
Picon
Favicon
Gravatar

Re: curl error : 52 - help

On Mon, 2 Oct 2006, lakshmipriya prabhu wrote:

> cURL error number :52

This is typically because the server is being stupid. It should never just not 
reply anything when using HTTP.

> 1) The Request is same as Browser Request

They're not. Your example shows the browser NOT following the redirect while 
your libcurl request did, so of course the browser didn't find the problem 
with the target URL since it didn't get it...

Also, you didn't mention what libcurl version you use, on what operating 
system it runs or if you can make this work with the command line tool.

--

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php

lakshmipriya prabhu | 2 Oct 2006 22:57
Picon
Favicon

Re: curl error : 52 - help

Hi Dan,
 
The request sent by the browser as well as the libcurl script is only POST /ABC/Upload.asp?pqr=1 HTTP/1.1
The next step in both cases, involves a redirection and GET /ABC/Upload.asp?pqr=2 HTTP/1.1
 

So both the requests are same.I have attached the redirection and GET in case of browser { which was missed in the previous message }also for your reference.
 
Please also find the details :
- Version & OS :- libcurl version 7.15.3 and OS Windows XP 2000, Also tried with libcurl version 7.15.4 { gives the same problem }
- command line url cannot be used in this application as it involves regular expression usage  for (Results display using pagination) which i do using PHP reg ex functions.
 
Please find the correct trace :
 
_______________________________________________
 
==========   BROWSER  TRACE ===========================
POST /ABC/Upload.asp?pqr=1 HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, application/x-shockwave-flash, */*
Referer: https://abc.def.ghi/ABC/Upload.asp?frompage=fromaspnet.asp
Accept-Language: en-us
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Host: abc.def.ghi
Content-Length: 124
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: ASP.NET_SessionId=oqsrg0fzyi04l255yludwi55; ASPSESSIONIDQQQBBDAQ=FJMFABKCPBLBDKEJDOACACMC
txtLines=0&optType=1&Delimiter=%2C&txtDelimiter=&Qualifier=%22&txtQualifier=&cmdSubmit.x=54&cmdSubmit.y=20
HTTP/1.1 302 Object moved
Connection: close
Date: Fri, 29 Sep 2006 22:36:04 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
Location: Upload.asp?pqr=2
Content-Length: 144
Content-Type: text/html
Cache-control: private
<head><title>Object moved</title></head>
<body><h1>Object Moved</h1>This object may be found <a HREF="Upload.asp?pqr=2">here</a>.</body>

GET /ABC/Upload.asp?pqr=2 HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, application/x-shockwave-flash, */*
Referer: https://abc.def.ghi/ABC/Upload.asp?frompage=fromaspnet.asp
Accept-Language: en-us
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Host: abc.def.ghi
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: ASP.NET_SessionId=n3xsecjesmhjrrf1qdepmp45; ASPSESSIONIDQQQACABQ=KLJLJAKAHFDAGOMIEFKGNJDM

HTTP/1.1 200 OK
Connection: close
Date: Fri, 29 Sep 2006 22:36:05 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
Content-Length: 31863
Content-Type: text/html
Cache-control: private
==========   BROWSER  TRACE ============================
**********   LIBCURL(SCRIPTS) TRACE **************************************
 ENTER STEP #######*
About to connect() to abc.def.ghi port 443
*   Trying aaa.bbb.cc.ddd... * connected
* Connected to abc.def.ghi (aaa.bbb.cc.ddd) port 443
* SSL connection using DES-CBC3-MD5
> POST /ABC/Upload.asp?pqr=1 HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1
.4322)
Host: abc.def.ghi
Accept: */*
Referer: https://abc.def.ghi/ABC/Upload.asp?frompage=fromaspnet.asp
Cookie: ASPSESSIONIDQQQBBDAQ=KJMFABKCLGPICEBANFDBLFCH; ASP.NET_SessionId=isliqa4
5maky2hejbpr1tw55
Content-Length: 124
Content-Type: application/x-www-form-urlencoded
txtLines=0&optType=1&Delimiter=%2C&txtDelimiter=&Qualifier=%22&txtQualifier=&cmdSubmit.x=54&cmdSubmit.y=20< HTTP/1.1 302 Object moved
< Connection: close
< Date: Sat, 30 Sep 2006 00:04:18 GMT
< Server: Microsoft-IIS/6.0
< X-Powere d-By: ASP.NET
< Location: Upload.asp?pqr=2
< Content-Length: 144
< Content-Type: text/html
< Cache-control: private
* Closing connection #0
* Issue another request to this URL: 'https://abc.def.ghi/ABC/Upload.asp?pqr=2'
* Disables POST, goes with GET
* About to connect() to abc.def.ghi port 443
*   Trying aaa.bbb.cc.ddd... * connected
* Connected to abc.def.ghi (aaa.bbb.cc.ddd) port 443
* SSL re-using session ID
* SSL connection using DES-CBC3-MD5
> GET /ABC/Upload.asp?pqr=2 HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1
.4322)
Host: abc.def.ghi
Accept: */*
Referer: https://abc.def.ghi/ABC/Upload.asp?frompage=fromaspnet.asp
Cookie: ASPSESSIONIDQQQBBDAQ=KJMFABKCLGPICEBANFDBLFCH; ASP.NET_SessionId=isliqa4
5maky2hejbpr1tw55
* Empty reply from server
* Connectio n #0 to host abc.def.ghi left intact
Array
(
    [url] => https://abc.def.ghi/ABC/Upload.asp?pqr=2
    [content_type] => text/html
    [http_code] => 302
    [header_size] => 240
    [request_size] => 905
    [filetime] => -1
    [ssl_verify_result] => 20
    [redirect_count] => 1
    [total_time] => 1.422
    [namelookup_time] => 0
    [connect_time] => 0.094
    [pretransfer_time] => 0.281
    [size_upload] => 0
    [size_download] => 0
    [speed_download] => 0
    [speed_upload] => 0
    [download_content_length] => 144
    [upload_content_l ength] => 0
    [starttransfer_time] => 0.5
    [redirect_time] => 0.922
)

cURL error number:52
cURL error:Empty reply from server* Closing connection #0
EXIT STEP  #######
**********   LIBCURL TRACE **************************************
 
 
_______________________________________________
 
 
Please suggest what might be the cause of this problem.
 
Thanks again,
LP

Daniel Stenberg <daniel <at> haxx.se> wrote:
On Mon, 2 Oct 2006, lakshmipriya prabhu wrote:

> cURL error number :52

This is typically because the server is being stupid. It should never just not
reply anything when using HTTP.

> 1) The Request is same as Browser Request

They're not. Your example shows the browser NOT following the redirect while
your libcurl request did, so of course the browser didn't find the problem
with the target URL since it didn't get it...

Also, you didn't mention what libcurl version you use, on what operating
system it runs or if you can make this work with the command line tool.

--
Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php

All-new Yahoo! Mail - Fire up a more powerful email and get things done faster.
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Marten Menke | 8 Oct 2006 01:25
Picon

Cookie - Unix works, Windows doesn't

Hi,

I'm using one of your example scripts to get me started with curl and am experiencing a problem I can't make head or tails of. I searched this list and the web, but found nothing.

I updated the ebay-login script and it's working fine on my (commercial) unix server, but not on my private windows server. The problem seems to lie in writing information to the cookie, as unix gives me 6 lines, but windows only 4, using the exact same script. It should be in step 1, as the line-difference already occured when I commented out step 2. The entire script also works on windows when I copy the "step 1" contents of the unix-cookie to the windows-cookie.

I've posted all info that I thought could help below, and would appreciate it very much if anyone could shine some light on this as I would like to run the final project (which actually will use some of this) one my windows server.

Thank you, Marten

___________________________________
I tried to get my servers to match each other as closely as possible and this is what they look like:

My Windows setup:
Apache/2.0.58 (Win32) PHP/4.4.4
libcurl/7.14.0 OpenSSL/0.9.8a zlib/1.2.3

The Unix setup:
Apache/1.3.26 (Unix) Debian GNU/Linux mod_fastcgi/2.4.2 mod_gzip/1.3.19.1a PHP/4.3.11
libcurl/7.12.1 OpenSSL/0.9.6c zlib/1.1.4

___________________________________
The cookie:

.ebay.com    TRUE    /    FALSE    0    ebay    value
.ebay.com    TRUE    /    FALSE    1223333725    dp1    value
.ebay.com    TRUE    /    FALSE    1191797725    nonsession    value
.ebay.com    TRUE    /    FALSE    0    s    value
.ebay.com    TRUE    /    FALSE    10    sru    value  // line appears on unix only
.ebay.com    TRUE    /    FALSE    1191797725    cid    value  // line appears on unix only

(if the cookies-values themselves are needed, let me know and I will post them, but rather not :p)
___________________________________
The script itself:

$ebay_user_id = "x"; // ebay id
$ebay_user_password = "y"; // ebay password
$cookie_file_path = preg_replace('/\\\\/', '/', getcwd()) ."/". $ebay_user_id .".cookie.txt";

// 1 - Get the Cookies required to login from the welcome login page

$LOGINURL = "http://signin.ebay.com/ws/eBayISAPI.dll?SignIn";
$vcurl = curl_version();
$agent = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7';

$ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, $LOGINURL);
    curl_setopt($ch, CURLOPT_USERAGENT, $agent);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
    curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file_path);
    curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file_path);
    curl_exec($ch);
  curl_close($ch);
unset($ch);

// 2 - Post Login Cookies and Login Information to Page http://signin.ebay.com/ws/eBayISAPI.dll

$LOGINURL = "http://signin.ebay.com/ws/eBayISAPI.dll";
$POSTFIELDS = 'MfcISAPICommand=SignInWelcome&siteid=0&co_partnerId=2&UsingSSL=0&ru=&pp=&pa1=&pa2=&pa3=&i1=-1&pageType=-1&rtmData=&userid='. $ebay_user_id .'&pass='. $ebay_user_password ;
$reffer = "http://signin.ebay.com/ws/eBayISAPI.dll?SignIn";

$ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, $LOGINURL);
    curl_setopt($ch, CURLOPT_USERAGENT, $agent);
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $POSTFIELDS);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
    curl_setopt($ch, CURLOPT_REFERER, $reffer);
    curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file_path);
    curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file_path);
  $result = curl_exec($ch);

    print     $result;   

_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Daniel Stenberg | 8 Oct 2006 12:21
Picon
Favicon
Gravatar

Re: Cookie - Unix works, Windows doesn't

On Sun, 8 Oct 2006, Marten Menke wrote:

> libcurl/7.14.0 OpenSSL/0.9.8a zlib/1.2.3

...

> libcurl/7.12.1 OpenSSL/0.9.6c zlib/1.1.4

If I were you I'd start with making sure they both run the same libcurl 
version (and a much newer one than the ones you use)...

--

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php

Marten Menke | 9 Oct 2006 00:29
Picon

Re: Cookie - Unix works, Windows doesn't

On Sun, 8 Oct 2006, Daniel Stenberg wrote:

> If I were you I'd start with making sure they both run the same libcurl version (and a much newer one than the ones you use)...

I tried running PHP 5.1.6 with build in libcurl 7.14.0 on both linux and windows, but do dice.
Some more searching yielded a solution though:

from: http://www.dinke.net/blog/2006/08/31/curl-http-client/en/

        //hack to make code work on windows
        if(strpos(PHP_OS,"WIN") !== false)
        {
            curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
        }

Works like a charm now.

Thank you for looking into it!



_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
grant little | 15 Oct 2006 09:14
Picon

page anchors with curl

using libcurl/7.14.0 OpenSSL/0.9.8a zlib/1.2.3 Apache/1.3.12 (Win32) PHP/4.4.4
id thee a way to have a post using curl to scroll to a page anchor?

I did some research and found an issue reported back in curl version 3 about anchors not scrolling.Who knows if that's stilll there.

I want to post some data and have the page scroll to the anchor that I specify in the curl url like so:
 
$sessions = curl_init();
curl_setopt($sessions,CURLOPT_URL," http://example.com#theanchor");
curl_setopt($sessions, CURLOPT_POST, 1);

global $start_date,$end_date;
$post_fields = "start_date=$start_date";
$post_fields .= "&end_date=$end_date";
  curl_setopt($sessions,CURLOPT_POSTFIELDS,$post_fields);
curl_setopt($sessions, CURLOPT_RETURNTRANSFER,0);
curl_exec($sessions);


when I do that it posts the data ok but the url shows in the browser without the anchor and doesn't scroll.
Tried all kinds of permutations but can't get it too work. May have to use location plus get instead.

Anyone have any insight? thanks.

_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Daniel Stenberg | 15 Oct 2006 10:09
Picon
Favicon
Gravatar

Re: page anchors with curl

On Sun, 15 Oct 2006, grant little wrote:

> id thee a way to have a post using curl to scroll to a page anchor?

"anchors" are used by the browser to scroll down to a particular point in the 
HTML, they have no meaning nor impact on a POST request, and thus libcurl has 
nothing to do with them.

--

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php

grant little | 15 Oct 2006 19:47
Picon

Re: page anchors with curl

On 10/15/06, Daniel Stenberg <daniel <at> haxx.se> wrote:

On Sun, 15 Oct 2006, grant little wrote:

> id thee a way to have a post using curl to scroll to a page anchor?

"anchors" are used by the browser to scroll down to a particular point in the
HTML, they have no meaning nor impact on a POST request, and thus libcurl has
nothing to do with them.


Thanks for the reply Daniel.
Although libcurl may have nothing to do with anchors,
I'd have thought that libcurl would pass on the url in it's entirety whereas it seems to strip the anchor off the end of the url.
Oh well, thanks anyway.

_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Daniel Stenberg | 15 Oct 2006 20:04
Picon
Favicon
Gravatar

Re: page anchors with curl

On Sun, 15 Oct 2006, grant little wrote:

> Although libcurl may have nothing to do with anchors, I'd have thought that 
> libcurl would pass on the url in it's entirety whereas it seems to strip the 
> anchor off the end of the url.

It sends exactly the string you pass in. It doesn't strip off the "anchor" and 
it never has. You can easily verify that yourself.

--

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php


Gmane