|
|
||||||
|
||||||
| Index Link To US Private Messages Archive FAQ RSS | ||||||
| Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome. |
Share Thread: & Tags
|
||||
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi, all...not sure if this is the right forum, but here it goes.
I need some help deciphering what my new web host company Go Daddy told me about the usage of PHP cURL from their hosting servers. I currently run some basic cURL in another site (on another web host) successfully. I once ran the same cURL code from another site, another web host. Now, I have a new domain and the above new web host running the same cURL code. When I execute the PHP cURL function (see code below), I get a "CURL Response: couldn't connect to host". Upon emailing the web host, they replied: Thank you for contacting Online Support. We support cURL extensions on all of our Linux hosting plans. Please note that proxy servers are not required for outbound shared hosting connections as of September 10, 2008. Although it will continue to function after this date, we recommend code utilizing proxy servers be updated to reflect this change. Unfortunately, we do not provide technical support with third-party scripting issues. We are very limited in the support we can offer for customer-written code or scripts. If there is evidence that our system is responsible for the error, please forward it to us, and we would be happy to look into the matter further. But at the moment this does not appear to be the case, so we regret we can not assist you further with this issue. Please, if anyone can explain in plain english what this means...I don't have a LOT of cURL experience. Here is the cURL code I use: $location = "ftp://somedomain.com/"; $textfile = "inventory.txt"; $fh = fopen($textfile, "w+"); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "$location$textfile"); curl_setopt($ch, CURLOPT_USERPWD, "userid curl_setopt($ch, CURLOPT_FILE, $fh); curl_exec($ch); echo "CURL Response: ".curl_error($ch)."\n"; curl_close ($ch); Thank you in advance... Getmea - John |
|
|||
|
Thanks for your suggestions, Dan...
[The host which you are attempting to connect to is not accepting FTP connections (test from another machine to confirm)] By "another machine" I assume you are referring to a different www.mydomain.com. The cURL used to work from a domain I no longer have. The same cURL works today from a new domain I have. Are you suggesting I open a new domain and web host to issue the cURL from there? Or another PC machine? [The host which you are attempting to run the cURL script from has blocked outbound FTP traffic (try a file_get_contents() call for an HTTP file and, if it succeeds, try FTP with the username/password embedded in the URI)] I ran a FTP test instead of cURL and it returns: "Could not open xxxx.yyyy.com". See code below. I open the site directly thru CuteFTP or IE, no issues. $remote_file = 'invstatfile.txt'; $local_file = 'myinvstatfile.txt'; $ftp_server = "xxxx.yyyyy.com"; $ftp_user_name = "user"; $ftp_user_pass = "pass"; // open some file to write to $handle = fopen($local_file, 'w'); // set up basic connection $conn_id = ftp_connect($ftp_server) or die("Could not open $ftp_server\n"); // login with username and password $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); // try to download $remote_file and save it to $handle if (ftp_fget($conn_id, $handle, $remote_file, FTP_ASCII, 0)) { echo "successfully written to $local_file\n"; } else { echo "There was a problem while downloading $remote_file to $local_file\n"; } [The host which you are attempting to connect to is not accepting FTP connections from the host running the cURL script] This might be the issue. OR, the Go Daddy host package I bought does not allow cURL or FTP...I will try to contact the Host's tech support tomorrow. Any other recommendations from the group? Has anyone experienced this using Go Daddy? Regards, Getmea |
|
|||
|
I did not see the last paragraph from the original email from Go Daddy:
FTP connections to a remote site cannot be made through scripting on shared hosting plans. If this is necessary for your site, you may want to consider a Virtual Dedicated or Dedicated Hosting account. For more information on these plans, please use the links below. From what I understand, cURL actually uses FTP (please correct me if I am wrong). If it is the case, does the above tell me I cannot use cURL nor FTP with my "economy" site? The difference is paying $41.97/mo instead of $4.95/mo. Regards, Getmea |
|
|||
|
Quote:
|
|
|||
|
Thanks, Speed...
I tried cURL from my new Go Daddy site to my other site and it didn't work as well. Since I don't have control of the host system (where the data resides) and I am hand-cuffed by Go Daddy, I will cancel the hosting. I will move to a host where I know it qill suite my needs. Thanks all for your responses. |
|
||||
|
For the record, just about any host which offers cPanel is going to have everything you need.
You have many, many choices (many of which will be more affordable and more functional than anything GoDaddy offers).
__________________
Dan LeFree | Product Manager (Linux VPS Hosting) | Owner/Operator (Web development, marketing) |
|
|||
|
Danlefree:
Yep...my other web host offers cpanel and it has many features I did not have with go daddy. One other feature every web host should have is the ability to view your error/server logs. Not with go daddy...it's only available with an upgraded host package. Thanks for your assistance! Getmea |
|
||||
|
Ever consider a shared hosting cloud? Cloud hosting is more powerful and dependable than any single dedicated server. Virtually zero percent downtime. Too much space and bandwidth.. And support for cUrl of course.
|
|
||||
|
This may be of interest: cURL groks URLs. cURL is a command line tool for transferring files with URL syntax, supporting FTP, FTPS, TFTP, HTTP, HTTPS, TELNET, DICT, FILE and LDAP. curl supports SSL certificates, HTTP POST, HTTP PUT, FTP uploading, HTTP form based upload, proxies, cookies, user+password authentication (Basic, Digest, NTLM, Negotiate, kerberos...), file transfer resume, proxy tunneling and a busload of other useful tricks.
|
|
|||
|
Thanks! I'll give it a try...may be usefull...
Getmea |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| What is Curl? | willanfei | eCommerce Discussion Forum | 2 | 05-22-2008 12:35 AM |
| cURL, embed PHP into HTML | TrafficProducer | IT Discussion Forum | 7 | 02-05-2008 07:18 AM |
| Page Curl Effect | WPW_Feedbot | Graphics & Design Discussion Forum | 0 | 03-09-2005 01:31 AM |
| Page Curl | WPW_Feedbot | Graphics & Design Discussion Forum | 0 | 01-19-2005 02:01 AM |
| php - curl - proxy ? help plz | AjiNIMC | Web Programming Discussion Forum | 1 | 10-04-2004 08:12 AM |
|
WebProWorld |
Advertise |
Contact Us |
About |
Forum Rules |
MVP's |
Archive |
Newsletter Archive |
Top |
WebProNews
WebProWorld is an iEntry, Inc. ® site - © 2009 All Rights Reserved Privacy Policy and Legal iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509 |