This file contains 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 system = require('system'); | |
if (system.args.length < 5) { | |
console.info("You need to pass in account name, username, password, and path to casperJS as arguments to this code."); | |
phantom.exit(); | |
} | |
var account = system.args[1]; | |
var username = system.args[2]; | |
var password = system.args[3]; |
This file contains 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 | |
/* | |
Here's a couple of metaboxes that I've recently created using this system | |
*/ | |
$subpostings = redrokk_metabox_class::getInstance('subpostings', array( | |
'title' => '(optional) Subscription for Postings', | |
'description' => "As an optional feature, you have a complete api at your disposal which will allow you the ability to offer and manage member posts. In addition to these settings, you may need to create the associated pages for accepting posts from your frontend.", |
This file contains 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 fakeReferrer = "http://porzky.com" | |
var targetUrl = "http://keyworddomains.com" | |
var casper = require('casper').create(); | |
casper.start(fakeReferrer, function() { | |
this.echo(this.getCurrentUrl()); | |
}); | |
casper.then(function(){ |
This file contains 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'); | |
//this is the path that QTNetwork classes uses for caching files for it's http client | |
//the path should be the one that has 16 folders labeled 0,1,2,3,...,F | |
exports.cachePath = '/path/to/phantomjs/cache/data/folder'; | |
//this is the extension used for files in the cache path | |
exports.cacheExtension = "d"; | |
//the resources that are to be saved |
This file contains 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
// http://casperjs.org/ | |
var casper = require('casper').create({ | |
pageSettings: { | |
loadImages: false, | |
} | |
}); | |
var fs = require('fs'); |
This file contains 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
# Define Variables + Casper Initialization | |
fakeReferer = 'https://google.com/' | |
targetUrl = 'https://facebook.com/' | |
casper = require('casper').create() | |
# Fake the referer | |
casper.start fakeReferer, -> |
This file contains 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({ | |
verbose : true, | |
logLevel : 'info' | |
}); | |
var images = []; | |
var fs=require("fs") | |
/** | |
* Configuration here | |
*/ |
This file contains 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 | |
require_once dirname( __FILE__ ) . '/class.settings-api.php'; | |
/** | |
* Theme Admin panel for Tareq's Planet | |
* | |
* @author Tareq Hasan | |
*/ | |
class Tareqs_Planet_Admin { |
This file contains 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
/*jshint strict:false*/ | |
/*global CasperError console phantom require*/ | |
/** | |
* grab links and push them into xml | |
*/ | |
var casper = require("casper").create({ | |
}); |
This file contains 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(); | |
casper.start(); | |
casper.open('http://borisschapira.com/'); | |
casper.then(function dumpHeaders(){ | |
this.currentResponse.headers.forEach(function(header){ | |
console.log(header.name +': '+ header.value); | |
}); | |
}); |