This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| while (true) { | |
| $contents = file_get_contents('http://feeds.arsenal.com/arsenal-news'); | |
| if (stripos($contents, 'mesut') !== FALSE) { | |
| echo date(DATE_RFC822) . ": It's official!\n"; | |
| mail('PUTYOUREMAIL@HERE.COM', 'Arsenal signed Ozil', ''); | |
| exit(0); | |
| } else { | |
| echo date(DATE_RFC822) . ": Nothing doing.\n"; | |
| sleep(10); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // #1 - Using a function | |
| function Apple (country) { | |
| this.country = country; | |
| this.color = "red"; | |
| this.getInfo = getAppleInfo; | |
| } | |
| function getAppleInfo() { | |
| return this.country + ' has ' + this.color + 'apples'.; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <head> | |
| <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script> | |
| </head> | |
| <body> | |
| <h1>Show Random Tip</h1> | |
| <ul id="tips" style="display:none"> | |
| <li>Dinner is good for you.</li> |
NewerOlder