Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If Modified since issue #6

Open
eileenmcnaughton opened this issue Oct 5, 2010 · 2 comments
Open

If Modified since issue #6

eileenmcnaughton opened this issue Oct 5, 2010 · 2 comments

Comments

@eileenmcnaughton
Copy link

Hi

Your If Modified since header wasn't working - this is what works for me ie, set HEADER to True & Set HTTPHEADER to the value required:

        if ( $modified_after ) {
            curl_setopt($ch, CURLOPT_HTTPHEADER, array("If-Modified-Since: $modified_after"));
        }
        curl_setopt($ch, CURLINFO_HEADER, 1);
@unifonenz
Copy link

not sure if i would put curl_setopt($ch, CURLINFO_HEADER, 1); as it will display the headers when returned, you just need
curl_setopt($ch, CURLOPT_HTTPHEADER, array("If-Modified-Since: $modified_after"));

@unifonenz
Copy link

i also have never heard of CURLINFO_HEADER, did you mean CURLOPT_HEADER?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants