Running a php script from another web page

1 replies
Is there a way to run a php script from another web page in another directory though the same domain besides an iframe? Iframe seems a little hokey to me though I did use it in a search and create script I wrote. Get file contents would be a bit complicated due to includes etc..

Rick
#page #php #running #script #web
Avatar of Unregistered
  • Profile picture of the author Kyle Parisi
    There are a few ways. You could make an ajax request to the second page using javascript. The reply from the second page can then be used however you see fit.

    One example of this that I made was onsite recommendations. A person would visit a product page, the javascript would then id the product and send a request to a php script which would generate the recommendations and reply with the html for those recommendations. At that point the javascript would insert the html into a specific element on the page.
    {{ DiscussionBoard.errors[11283375].message }}

Trending Topics