Let me clear you the problem.
The php script( say "geturl.php" ) is on the same server/host as javascript/html page. Moreover geturl.php is a simple php script which takes a url and downoad its content parse it to get required string and then output it through echo.
Now I want to call this geturl.php from javascript passing url as argument and want to get its output back in some javascript variable.
should i post the code??
Main Topics
Browse All Topics





by: glcumminsPosted on 2007-10-02 at 23:00:03ID: 20004239
This is, by definition, AJAX (Asyncronous Javascript and XML). You will submit a background request, via Javascript, to the remote server. The remote server will process your request via PHP, and return the results in XML (or other format of your choice).
Unfortunately, AJAX is sufficiently complex that I will not post an example here since I do not know your specific requirements. You can find a number of good tutorials via your favorite search engine.