Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Development Tools

local host?

While testing a script using a local host server and the script calls for an ip action, will it complete the task by connecting to the web. ex. if the script calls to post results from a live site online...do I have to be running live myself or can the local host call live sites

3 Answers

Can you explain your question in detail. What script are you using (javascript, erb, etc)? What is it you are calling? Are you reading a Resource (json, xml) from a live site online elsewhere into your localhost? Are you on Rails or PHP?

running a php script that searches a live data base on line. Can a local server pull data from on line and post it back to the local browser. Using json to pull data. Just need to see if testing on ny locsl server will work or do I need to pay for a dev. server.

It should be able to do that. Are you using CURL requests through PHP to query something? Sometimes, adding some bit of jQuery (javascript) can be able to load data from a remote (online) site to your localhost.

Ref: [1] http://stackoverflow.com/questions/13241344/grabbing-data-from-a-website-with-curl-after-logging-in [2] http://themekraft.com/blog/getting-json-data-with-php-curl/

This depends on how you want to use your code.

thanks,