Attilitus Posted February 2, 2007 Share Posted February 2, 2007 Part of my licensing script requires that I access an external URL while passing parameters (which are included in the url as ?parameter=parametervalue, ect.) I have been simply using the file() command, but it takes at the very least a good second to access it, which is simply too much time. It is a delay that occurs regardless of the external server speed. Could anyone suggest some faster lightweight methods of getting the contents of an external parameter'D url? Quote Link to comment Share on other sites More sharing options...
Attilitus Posted February 3, 2007 Author Share Posted February 3, 2007 Anyone has a way to speed it up, and/or suggestions to decrease the impact of the delay on my script? Thanks again for any help. Quote Link to comment Share on other sites More sharing options...
Hypnos Posted February 3, 2007 Share Posted February 3, 2007 You're going to have a delay, no matter what. You shouldn't fetch a file from another server for each page load. At least cache a copy of it on a daily/hourly/etc basis. Something that might make it slightly faster is to use the IP, if it's not on a shared host. That way you aren't waiting on the DNS server. Quote Link to comment Share on other sites More sharing options...
Attilitus Posted February 3, 2007 Author Share Posted February 3, 2007 Yea. :/ I guess a caching system is in order, still how much time could an IP lookup rather than DNS save? What is typically the fastest format for external data fetching? I notice that a TXT file externally parses far faster than than a php script, perhaps an external caching system would be optimum. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.