Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Web Coding › Website update notification script
New Posts  All Forums:Forum Nav:

Website update notification script

post #1 of 4
Thread Starter 
I was wondering if anybody knows of a script that would notify me when a website's page changes, in this case I want my college's website to notify me when a class I'm trying to add becomes open. I'm thinking the script would see that the icon next to the particular class would change (indicating that it's now open), and based on that it would email me or something. It also needs to continuously refresh the page. Can someone help me out? I have zero experience in sort of thing.
My System
(15 items)
 
  
CPUMotherboardGraphicsRAM
i5-2500k 4.4GHz P8Z68-V ASUS gtx 580 DCII 910MHz Corsair Vengeance 8gb 1600MHz 
Hard DriveOptical DriveOSMonitor
Samsung Spinpoint 1TB 7200rpm ASUS Windows 7 Ultimate 64-bit Dell U2311H 
KeyboardPowerCaseMouse
Leopold Tenkeyless FC200RL Corsair TX850M HAF 922 Logitech G500 
Mouse PadAudioAudio
X-Trac pro ibasso d4 Mamba amp/dac Ultrasone HFI-780 
  hide details  
Reply
My System
(15 items)
 
  
CPUMotherboardGraphicsRAM
i5-2500k 4.4GHz P8Z68-V ASUS gtx 580 DCII 910MHz Corsair Vengeance 8gb 1600MHz 
Hard DriveOptical DriveOSMonitor
Samsung Spinpoint 1TB 7200rpm ASUS Windows 7 Ultimate 64-bit Dell U2311H 
KeyboardPowerCaseMouse
Leopold Tenkeyless FC200RL Corsair TX850M HAF 922 Logitech G500 
Mouse PadAudioAudio
X-Trac pro ibasso d4 Mamba amp/dac Ultrasone HFI-780 
  hide details  
Reply
post #2 of 4
Thread Starter 
Something I should add, the page that I would need the script to check is within my account on my school's website, and the URL stays the same on all pages within my account, so I don't know how I would specify exactly what page it is.
My System
(15 items)
 
  
CPUMotherboardGraphicsRAM
i5-2500k 4.4GHz P8Z68-V ASUS gtx 580 DCII 910MHz Corsair Vengeance 8gb 1600MHz 
Hard DriveOptical DriveOSMonitor
Samsung Spinpoint 1TB 7200rpm ASUS Windows 7 Ultimate 64-bit Dell U2311H 
KeyboardPowerCaseMouse
Leopold Tenkeyless FC200RL Corsair TX850M HAF 922 Logitech G500 
Mouse PadAudioAudio
X-Trac pro ibasso d4 Mamba amp/dac Ultrasone HFI-780 
  hide details  
Reply
My System
(15 items)
 
  
CPUMotherboardGraphicsRAM
i5-2500k 4.4GHz P8Z68-V ASUS gtx 580 DCII 910MHz Corsair Vengeance 8gb 1600MHz 
Hard DriveOptical DriveOSMonitor
Samsung Spinpoint 1TB 7200rpm ASUS Windows 7 Ultimate 64-bit Dell U2311H 
KeyboardPowerCaseMouse
Leopold Tenkeyless FC200RL Corsair TX850M HAF 922 Logitech G500 
Mouse PadAudioAudio
X-Trac pro ibasso d4 Mamba amp/dac Ultrasone HFI-780 
  hide details  
Reply
post #3 of 4
You'd need something setup on a computer that could run the task (automated job) on a interval you choose and then use something like cURL with PHP to do what you want.

CURL would allow you to authenticate on your schools website and then redirect to various pages, picked out HTML chunks and look for keywords - I've done this in the past for various similar projects and cURL worked the best imo.

I will let you know that if you decide to do this you'll want to make sure you pick a "fair" interval for your automation otherwise you could have some angry sysadmins coming at you wondering how you're authenticating on their site 1000 times in a second and why biggrin.gif

Resources that I found via google that look to be good reads for you:
http://www.matthewwatts.net/tutorials/php-tutorial-2-advanced-data-scraping-using-curl-and-xpath/

http://voices.yahoo.com/how-scrape-web-page-using-php-curl-5442987.html

http://stackoverflow.com/questions/3880628/how-to-scrape-websites-when-curl-and-allow-url-fopen-is-disabled

Good luck!
AMD Rig
(12 items)
 
  
CPUMotherboardGraphicsGraphics
8320 FX Gigabyte 990FX-UD3 XFX R9 270X XFX R9 270X 
RAMHard DriveOptical DriveCooling
Crucial Ballistix Sport Kingston V300 Bluray Cooler Master Seidon 240M 
OSKeyboardPowerCase
Windows 7 x64 Ultimate CM QuickFire Corsair CX750M Corsair 540 Air 
  hide details  
Reply
AMD Rig
(12 items)
 
  
CPUMotherboardGraphicsGraphics
8320 FX Gigabyte 990FX-UD3 XFX R9 270X XFX R9 270X 
RAMHard DriveOptical DriveCooling
Crucial Ballistix Sport Kingston V300 Bluray Cooler Master Seidon 240M 
OSKeyboardPowerCase
Windows 7 x64 Ultimate CM QuickFire Corsair CX750M Corsair 540 Air 
  hide details  
Reply
post #4 of 4
^ that.

If you're running linux then it's dead easy:
Code:
email='email@example.com'
curl -b cookie-key=cookie-value > newsite.html
diff newsite.html oldsite.html > /dev/null
if [[$? != 0]]; then
    mail -s "site change" $email < newsite.html
fi
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Web Coding
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Web Coding › Website update notification script