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

curl-and-php

Re: Not able to follow redirections

From: Gowranga <gowranga_at_serc.iisc.ernet.in>
Date: Thu, 14 Jun 2007 00:19:50 +0530 (IST)

> On Wed, 13 Jun 2007, Gowranga wrote:
>
>> I have tried using different User agents, but followlocation seems to be
>> not
>> working. Kindly let me know if libcurl has not been compiled properly
>> because curl on command line too fails.

>
> Can you show us exactly what "curl -v -L www.google.com" outputs? (you can
> out
> out the HTML, if any, that it sends after the redirect)
>
> --

Thanks for your mail.
curl -x proxy:port -v -L www.google.com
gives

------------------------------------------------------------------
<html><head><meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1"><title>Google</title><style><!--
body,td,a,p,.h{font-family:arial,sans-serif}
.h{font-size:20px}
.h{color:#3366cc}
.q{color:#00c}
--></style>
<script>
<!--
function sf(){document.f.q.focus();}
// -->
</script>
</head><body bgcolor=#ffffff text=#000000 link=#0000cc vlink=#551a8b
alink=#ff0000 onload="sf();if(document.images){new
Image().src='/images/nav_logo3.png'}" topmargin=3 marginheight=3><div
align=right id=guser style="font-size:84%;padding-bottom:4px"
width=100%><nobr><a
href="/url?sa=p&pref=ig&pval=3&q=http://www.google.co.in/ig%3Fhl%3Den&usg=AFQjCNHXYQJ8gwRiWoseWnS0pbNfvX6PaA">iGoogle</a>&nbsp;|&nbsp;<a
href="https://www.google.com/accounts/Login?continue=http://www.google.co.in/&hl=en">Sign
in</a></nobr></div><center><br id=lgpd><table cellpadding=0 cellspacing=0
border=0><tr><td align=right valign=bottom><img src=images/hp0.gif
width=158 height=78 alt="Google"></td><td valign=bottom><img
src=images/hp1.gif width=50 height=78 alt=""></td><td valign=bottom><img
src=images/hp2.gif width=68 height=78 alt=""></td></tr><tr><td class=h
align=right valign=top><b></b></td><td valign=top><img src=images/hp3.gif
width=50 height=32 alt=""></td><td valign=top class=h><font color=#666666
style=font-size:16px><b>India</b></font></td></tr></table><br><form
action="/search" name=f><style>#lgpd{display:none}</style><script
defer><!--
//-->
</script><table border=0 cellspacing=0 cellpadding=4><tr><td nowrap><font
size=-1><b>Web</b>&nbsp;&nbsp;&nbsp;&nbsp;<a class=q
href="http://images.google.co.in/imghp?ie=ISO-8859-1&oe=ISO-8859-1&hl=en&tab=wi">Images</a>&nbsp;&nbsp;&nbsp;&nbsp;<a
class=q
href="http://groups.google.co.in/grphp?ie=ISO-8859-1&oe=ISO-8859-1&hl=en&tab=wg">Groups</a>&nbsp;&nbsp;&nbsp;&nbsp;<a
class=q
href="http://news.google.co.in/nwshp?ie=ISO-8859-1&oe=ISO-8859-1&hl=en&tab=wn">News</a>&nbsp;&nbsp;&nbsp;&nbsp;<a
class=q
href="http://scholar.google.com/schhp?ie=ISO-8859-1&oe=ISO-8859-1&hl=en&tab=ws">Scholar</a>&nbsp;&nbsp;&nbsp;&nbsp;<b><a
href="/intl/en/options/"
class=q>more&nbsp;&raquo;</a></b></font></td></tr></table><table
cellpadding=0 cellspacing=0><tr valign=top><td width=25%>&nbsp;</td><td
align=center nowrap><input name=hl type=hidden value=en><input type=hidden
name=ie value="ISO-8859-1"><input maxlength=2048 name=q size=55
title="Google Search" value=""><br><input name=btnG type=submit
value="Google Search"><input name=btnI type=submit value="I'm Feeling
Lucky"></td><td nowrap width=25%><font size=-2>&nbsp;&nbsp;<a
href=/advanced_search?hl=en>Advanced Search</a><br>&nbsp;&nbsp;<a
href=/preferences?hl=en>Preferences</a><br>&nbsp;&nbsp;<a
href=/language_tools?hl=en>Language Tools</a></font></td></tr><tr><td
align=center colspan=3><font size=-1>Search: <input id=all type=radio
name=meta value="" checked><label for=all> the web </label><input id=cty
type=radio name=meta value="cr=countryIN"><label for=cty> pages from India
</label></font></td></tr></table></form><br><font size=-1>Google.co.in
offered in: Hindi <a
href="http://www.google.co.in/bn">Bengali</a> <a
href="http://www.google.co.in/te">Telugu</a> <a
href="http://www.google.co.in/mr">Marathi</a> <a
href="http://www.google.co.in/ta">Tamil</a> </font><br><br><br><font
size=-1>Advertising Programs - <a
href="/intl/en/about.html">About Google</a> - <a href=/intl/en/jobs/>We're
Hiring</a> - <a href=http://www.google.com/ncr>Go to
Google.com</a></font><p><font size=-2>&copy;2007
Google</font></p></center></body></html>

------------------------------------------------------------------
I have tried using cookies but this has not helped much.

-gowranga

_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2007-06-13