Jump to content

Serenissima

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

About Serenissima

  • Birthday 01/06/1964

Contact Methods

  • Website URL
    http://

Profile Information

  • Gender
    Not Telling
  • Location
    Derbyshire Peak District, UK

Serenissima's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi, I have a Dreamweaver templete with named editable regions. I want to use php to extract the information that has been put into the editable region. I have got the code for a page into a variable using the following: $webpage = "http://www.mydomain.com/thepage.htm"; $fp = fopen($webpage,"r"); $page =""; while (!feof($fp)) $page.=fgets($fp,1000); fclose($fp); And on the page is a chunk of code starting <!-- #BeginEditable "title" --> I want to retrieve the code that follows as far as <!-- #EndEditable --> I tried exploding $page into an array of words thusly: $page_array = explode(" ",$page); and had thought of looping through the array until I found #BeginEditable "title" then pulling out the following array elements until I got to #EndEditable, but for some reason the #BeginEditable isn't matching (if I loop through and echo each array element it doesn't appear. But if I echo $page and look at the source html it is!). I can find the position within the string of where it starts (using strpos) but as I don't know how long the code will be until the #EndEditable I can't use substr to pull it out. Does anybody have any ideas please?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.