I'm embarking on an interesting project to gain work experience in php. Just stuck on one thing and wondering if you can help.
You probably used Team Viewer. This is where I create a Team Viewer session and get a unique number and if I give you it then with that number you can login to my computer and see what is on my screen and you can remotely control my computer.
Creating something similar. Only difference is, you won't remotely control my computer nor access any parts of my computer but only see what I am viewing in an iframe.
So, it is like this ...
I register for a member account. I login to my member account. I add you as "friend". Now, you can view what I am viewing on an iframe.
My homepage (member account page after I login) will show me 2 iframes. Whatever, I browse on the 1st iframe is remotely viewed by my friends like you. And whatever page you (my friend) is viewing in your 1st iframe gets shown to me on my 2nd iframe.
So, my 1st iframe records what I'm viewing to show to you, my friend, on your 2nd iframe.
And my 2nd iframe shows what page you, my friend, are viewing on your 1st iframe inside your member account.
Simple concept, really. No rocket science.
So, technically, this is how it works ...
Whatever url I view in my 1st iframe (whatever url the iframe opens to and whatever links I click inside the iframe) gets recorded onto mysql like so ...
Now, your member acc home page would show the webpage I am viewing in your 2nd iframe.
Your 2nd iframe pulls that (above mentioned mysql data) data and opens to the webpage mentioned on column (Latest_Viewing_Url) position: 0.
In this example, your 2nd iframe opens to: 1.com.
When I move-on to another page (eg. by clicking a link on 1.com) then that gets not INSERTED but UPDATED on "Latest_Viewing_Url" column position: 0.
And things work vice versa for both of us.
See, I told you it is an interesting project for a beginner like me. Everything is nearly finished. But a problem:
How do I get the iframe to record (onto "Latest_Viewing_Url" column; pos: 0, all the links I click inside the iframe (in this example the url I visit after clicking a link on 1.com) ?
I can code for there to be a "Visit" or "Go To Url" button so when I click it then the url in the "Url" html text box gets recorded onto the db. But that is only recording the urls that I view by clicking the "Go" button, Imagine, I clicked a link inside the iframe. Now, that link will have no connection with the "Go" button. hence, I'm in a puzzle how to record what links get clicked. If somehow, I can program the script to monitor the url field on the iframe every 5 secs for any changes so when it finds the url has changed then to record it on the db. But guess what ? I have no clue how to do that. Meaning, how to get the script to monitor what url is residing in the iframe url field. i know how to do this in Ubot Studio (.exe) bot but not php. And so, I need your brilliant help!
Care to show a few samples for all present and future newbies ? Newbies would appreciate your help for future to come!
A single line of code that notes down every url that loads in the iframe should do the trick!