Solved

cURL Simple Question

Posted on 2008-10-25
5
243 Views
Last Modified: 2010-10-05
When I give "http://www.gsp" to cURL, it gives me the page from "http://www.gps.com". I want to disable this behaviour (adding .com to invalid urls).
0
Comment
Question by:shellex
5 Comments
 
LVL 13

Accepted Solution

by:
Xyptilon2 earned 41 total points
Comment Utility
I cannot reproduce this unfortunately, perhaps a work around is to request the http server response and treat the 404 as a condition to trigger code?
0
 
LVL 25

Assisted Solution

by:Squinky
Squinky earned 38 total points
Comment Utility
Are you using a search-enhanced DNS like OpenDNS? You won't get a 404 from a server that doesn't exist.
0
 
LVL 50

Assisted Solution

by:Steve Bink
Steve Bink earned 38 total points
Comment Utility
Another 2 cents: I don't believe this is a function of curl.  I do know that some ISPs automatically put in an enhanced DNS without informing the customers.  I had the same thing when I opened a new account with Time-Warner/Roadrunner.  Check with your provider, and check the configuration for the DNS resolver on the client machine.
0
 
LVL 38

Assisted Solution

by:Aaron Tomosky
Aaron Tomosky earned 38 total points
Comment Utility
are you using CURLOPT_PROXY by chance? If so, your proxy could be appending the .com.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Both Easy and Powerful How easy is PHP? http://lmgtfy.com?q=how+easy+is+php (http://lmgtfy.com?q=how+easy+is+php)  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
This article discusses four methods for overlaying images in a container on a web page
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to dynamically set the form action using jQuery.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now