PHP script to read specific lines from a webpage

Hi folks, this is my first post, so please be gentle. I’ve done PHP in the past, making booking forms for a B&B and to transform form data into an e-mail. That I’m ok with, but I’m in need of help creating a PHP for a specific purpose.

I get an email from my website saying a client requests a quote, the website generates a unique reference number and a link to the individual quote. Now, what I normally have to do is access the page, cut & paste details such as reference number, date of event, location of event, contact name, telephone number, email, and budget. It’s a lot of to and fro-ing, cutting & pasting, and often leads to mistakes when multiples of these quotes need to be done at any given time.

I’ve created a secure page on my website, where I can enter the URL of the quote generated and click ‘Submit’, where I want it to go to the URL I specified, read the ‘bits’ I need, and generate an e-mail, which I have all set to respond to, just fill in the blank about price. So I’ve got the start, and the finish sorted, it’s the bit in the middle I’m stuck at.

A PHP script, that can be pointed at a specific URL/File, read the file, take the ‘bits I need’, generate an e-mail on Windows Live Email or even a webpage of it’s own created with the formatting I use for the e-mail and I can use that to send, I shove in the price, check over, click send, and Bob’s your uncle. Any help would be most appreciative.

Apologies if this is in the wrong category, moderators please move if needed.

Ok, if it helps, here’s a snippet of what I require from numbered lines when viewing the source:

Line Info required

200 <td height="30" align="left" valign="top">From 19:30 to 00:00</td>

I have 8 lines in total that I need details from, such as this line, the ‘From 19:30 to 00:00’ Is the part that I need, the rest of the line is obviously not required.

Sponsor our Newsletter | Privacy Policy | Terms of Service