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
| var fs = require('fs'); | |
| var request = require('request'); | |
| var urls = new Array("http://www.yahoo.com","http://www.bing.com"); | |
| function scrape(url,file){ | |
| request(url, function (error, response, body) { | |
| if (!error && response.statusCode == 200) { | |
| console.log('request url: '+url); |
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
| var fs = require('fs'); | |
| var request = require('request'); | |
| var urls = new Array("http://www.yahoo.com","http://www.bing.com"); | |
| for (var i = 0; i < urls.length; i++) { | |
| var file = 'log'+[i]+'.txt'; | |
| var url = urls[i]; |
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
| <select name="state"> | |
| <option value="AL">Alabama</option> | |
| <option value="AK">Alaska</option> | |
| <option value="AZ">Arizona</option> | |
| <option value="AR">Arkansas</option> | |
| <option value="CA">California</option> | |
| <option value="CO">Colorado</option> | |
| <option value="CT">Connecticut</option> | |
| <option value="DE">Delaware</option> | |
| <option value="FL">Florida</option> |
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
| var casper = require('casper').create({ | |
| viewportSize: { | |
| width: 1024, | |
| height: 768 | |
| } | |
| }); | |
| var webpage = "http://wordpress.org/"; | |
| var useragents = [ |
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
| var casper = require('casper').create(); | |
| var webpage = "http://wordpress.org/"; | |
| casper.on('resource.requested', function(resource) { | |
| for (var obj in resource.headers) { | |
| var name = resource.headers[obj].name; | |
| var value = resource.headers[obj].value; | |
| if (name == "User-Agent"){ |
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 | |
| $url = 'csslint.net'; | |
| $cmd = "wget -nd -p --convert-links -P downloads/csslint \"$url\" "; | |
| exec($cmd); | |
| ?> |
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 | |
| /** | |
| * Grab Images from Wikipedia via thier API | |
| * | |
| * @author http://techslides.com | |
| * @link http://techslides.com/grab-wikipedia-pictures-by-api-with-php | |
| */ | |
| //curl request returns json output via json_decode php function |
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
| <video controls> | |
| <source src=http://techslides.com/demos/sample-videos/small.webm type=video/webm> | |
| <source src=http://techslides.com/demos/sample-videos/small.ogv type=video/ogg> | |
| <source src=http://techslides.com/demos/sample-videos/small.mp4 type=video/mp4> | |
| <source src=http://techslides.com/demos/sample-videos/small.3gp type=video/3gp> | |
| </video> |
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 | |
| /** | |
| * Twitter List Tweets PHP script that order tweets by user. | |
| * | |
| * @author http://techslides.com | |
| * @link http://techslides.com/grab-twitter-list-tweets-order-by-user | |
| */ | |
| function curl($url){ |