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

curl-and-php

if (window != top)..... advice needed!

From: CarbonCopy123 <artificialsteve_at_gmail.com>
Date: Mon, 9 Jun 2008 16:23:37 -0700

Hello, i have been stuck trying to access files from a server. I am
logged in while trying to do it, however all I get back is this:
<script language="JavaScript" type="text/javascript">
                                <!--
                                        if (window != top)
                                                top.location.href = "/default.cfm"
                                // -->
                                </script>
                        
The response code is 200. upon viewing the header output, it shows
that the proper cookies / session data was passed, but still no page!!
i don't understand what is happening here, my script is as follows:

function get_web_page( $url )
{
        $options = array(
                CURLOPT_RETURNTRANSFER => true, // return web page
                CURLOPT_HEADER => true, // don't return headers
                CURLOPT_FOLLOWLOCATION => true, // follow redirects
                CURLOPT_ENCODING => "", // handle compressed
                //CURLOPT_USERAGENT => "spider", // who am i
                CURLOPT_AUTOREFERER => true, // set referer on redirect
                CURLOPT_CONNECTTIMEOUT => 120, // timeout on connect
                CURLOPT_TIMEOUT => 120, // timeout on response
                CURLOPT_MAXREDIRS => 10, // stop after 10 redirects
        );

        $ch = curl_init( $url );
        curl_setopt_array( $ch, $options );
        $content = curl_exec( $ch );
        $err = curl_errno( $ch );
        $errmsg = curl_error( $ch );
        $header = curl_getinfo( $ch );
        curl_close( $ch );

        $header['errno'] = $err;
        $header['errmsg'] = $errmsg;
        $header['content'] = $content;
        return $header;
}
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2008-06-10