Devam Ediyor

476254 Scraping from RSS feeds (PHP Script)

This project involves scraping prices from simple RSS feeds. Here's how it will work:

File 1: [url removed, login to view]

The content of [url removed, login to view] is a format like this:

"City 1";"[url removed, login to view]";"email at [url removed, login to view]";"Any=900;ANC=450;EWR=400;HNL=450"

"City 2";"[url removed, login to view]";"email at [url removed, login to view]";"Any=600;BLI=450;YVR=400;LAX=450"

"City 3";"[url removed, login to view]";"email at [url removed, login to view]";"Any=800;BLI=450;YVR=400;LAX=450"

You can see that each line in the text file has 4 parameters.

File 2: [url removed, login to view]

- When [url removed, login to view] is executed from the cron, it will look at line 1 in [url removed, login to view] and go to the URL (the RSS feed that is to be scraped)

- Taking a look at the URL, the script will compare what is in the RSS feed with the parameters set in [url removed, login to view]

For example, looking at line 1 in [url removed, login to view], we can see that if any code under a value of 900 is found, it will send an alert e-mail.

But for code ANC, the value must be under 450 for it to send an alert e-mail. For code EWR it must be under 400.

The alert e-mail is just a simple e-mail, with something like:

Subject: City 1 to ANC under 450

And then the body has a link, that's taken from the RSS feed.

When an e-mail is sent, the script should store the numerical value of what was sent (example: 450 for ANC) and then the next time the script gets to line 1, it will not send the e-mail again, unless the value is different from 450. This is just to prevent the script from sending the same thing over and over again.

- The next time [url removed, login to view] is executed from the cron, it processes line 2 from [url removed, login to view] And then the next line 3, etc. Looping back to line 1.

* Important *

I would like the script to avoid using a MySQL database, relying just on files.

The server has PHP5.x, so scripts using PHP5 are fine.

Beceriler: Her şey Kabul, MySQL, PHP, Kabuk Betiği, Web Scraping, XML

Daha fazlasını görün: value city, subject php, php is, lax, php text xml, rss email php script, format rss php, script alert, xml mysql php script, set mail php server, rss url, mysql store xml, server sent php, url link xml, rss project server, feed rss email php, simple alert php, set mail server php, email xml format, alert email mysql php, content feed script, xml feed database php, project using php xml, mail rss php, store email body mysql

İşveren Hakkında:
( 19 değerlendirme ) Calgary, Canada

Proje NO: #2222159