First of all please forgive my level of knowledge (or lack of it) at this stage.
I recently retired and as a 'hobby' took up photography and am now trying to build a web site to share the results with family and friends.
To do this will take me a while as I need to study various aspects of web creation, one of which is PHP.
My initial problem is that I have a script which displays photographs and also the detail (EXIF) contained in the photograph, but a part of the data is not held in the way I need to display and then at a later store it to a database.
So I found a separate script which converts the data to the form I need it. I understand the concept of the second script (I think) but cannot figure out how to include it in the original script to display the information.
The 'combined' script is attached. I have attached it so I can refer to it by line number (and the 'php' wrapping does not show line numbers).
The first thing the script does is loads an image file - line 7
The next is to extract the EXIF data - line 11 - which is read to an 'array' I believe.
The original script to display the exif data used to start at line 64 where it loaded the data in $ReadEXIFData, so I commented that out and called the data back in from the already loaded $exif - that way I had to make no changes to the script that followed.
between lines 72 and 173 the data is extracted directly as is from the EXIF, and lines 178 to the end display the data using html.
I changed this html to include the headings 'Decimal Longitude' and ' Decimal Latitude' which is where I want to display the calculated values.
As the GPS Latitude and Longitude are held as an array of Degrees/Minutes/Seconds in the EXIF, I added lines 13 to 57 of the script, copying them over from the conversion script, and this extracts the GPS arrays and convert them to Decimal, the results being placed in an array (line 4).
To test it, it is printed in lines 50 to 55, the results appearing in the top left of the web page.
What I am having trouble with is displaying this information in the correct place in the box where it says NEED CODE (ie including them in the html)
If anyone has the time and inclination to offer any guidance on how to do this would be appreciated - bearing in mind I have to ament this script later to store all the data in a sql database.
TIA