www.webdeveloper.com
Results 1 to 2 of 2

Thread: General Q's about javascript and php

  1. #1
    Join Date
    Mar 2013
    Posts
    1

    General Q's about javascript and php

    I realise php is a server side language and Javascript is clientside
    I have an issue
    My php code uses
    curl to get an xml response from a web api.
    simplexml to parse the results

    What I "think" I want to do is record the xml data ( it changes every 10 minutes) onto a mysql database so that I have a historical record of data from that web server.
    I then want a web page to show a table or one day a visualisation of that data and have the user able to enter various timeframes ( eg, go back to last week)
    I assume I'm going to have to build the webpage in jquery or straight js.

    My questions are
    At what point to I stop working in php and start using the webpage , I'm a bit confused as to how one communicates with the other.
    Do I just use a cron job to run the curl script every 10 mins ?
    As you can tell I'm very new to all this - can any one recommend tutorials for simple people that show options for doing things once I have my data in a xml object.?
    cheers

  2. #2
    Join Date
    Mar 2012
    Posts
    935
    I find that the easiest way to communicate between web page and php script is to embed the php in the web page. If you want the same scripts to be available to multiple pages, include them as a php include file. As for curl and xml objects, that goes over my head...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles