Solved

cURL Simple Question

Posted on 2008-10-25
5
256 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
ID: 22806247
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:Marcus Bointon
Marcus Bointon earned 38 total points
ID: 22807798
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
ID: 22807885
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
ID: 23416464
are you using CURLOPT_PROXY by chance? If so, your proxy could be appending the .com.
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to use embargo Date/time in php 29 35
I wonder how people fake their ip address? 3 36
Curl & PHP Command Help 4 22
What does != "" mean in programming 6 21
Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

813 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