Sometimes curl returns nothing, but page comes up in browser

I have used curl to get a preview of code for web pages I think might be dicey. Sometimes nothing comes back, though a page will come up if I open the URL in a browser. I haven’t tried to look at the header that curl sends, so I don’t know what browser it identifies. Can a server determine if the request comes from curl and then decline to serve a page?

Yes, it looks at the user-agent which by default identifies curl as the requester. You can change it if you like.

Nailed it. Thanks very much!

Glad I could help.