Let me see how I can explain this... sorry for the confusion.
I have created a CMS and when the client wants to leave my service I want to take out my CMS code in the page but still leave them with the content they wrote.
So in theory I can scrape the code from the page, save it to a variable, delete the page then upload the same page with the scraped html content. This creates a identical page without the PHP.
So for example, Johnny Drake has a service with us. His website has 5 pages.
Index, About, Service, Solutions and Contact Us.
He decieds he can get better service else where, so I click delete in my admin and the server goes through the index page, scrapes the generated html code, deletes the index page and re uploads the index page with the scraped generated html code. Then it does it for the rest of the pages.
This would work if I allowed more connections to my ftp, but I would like to do it with one connection. What is the best way to do this?