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 | |
function getinboundLinks($domain_name) { | |
ini_set('user_agent', 'NameOfAgent (<a class="linkclass" href="http://localhost">http://localhost</a>)'); | |
$url = $domain_name; | |
$url_without_www=str_replace('http://','',$url); | |
$url_without_www=str_replace('www.','',$url_without_www); | |
$url_without_www= str_replace(strstr($url_without_www,'/'),'',$url_without_www); | |
$url_without_www=trim($url_without_www); | |
$input = @file_get_contents($url) or die('Could not access file: $url'); | |
$regexp = "<a\s[^>]*href=(\"??)([^\" >]*?)\\1[^>]*>(.*)<\/a>"; |
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
include('simple_html_dom.php'); // DOM parsing library. | |
$url = (isset($_GET['site'])) ? $_GET['site'] : 'http://www.yelp.com'; //just an example, clean this | |
$dom = file_get_html($url); | |
foreach ($dom->find('a') as $node) { | |
// Replace href attribute value | |
$node->href = 'http://YOURPROXYSERVER.COM?requestedurl='.urlencode($url.$node->href); | |
} | |
// Output modified DOM | |
echo $dom->outertext; |
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 | |
class helper { | |
//--------------------------------------------------------------------------- | |
public function __construct() { | |
} |
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 | |
function get_web_page( $url,$curl_data ) | |
{ | |
$options = array( | |
CURLOPT_RETURNTRANSFER => true, // return web page | |
CURLOPT_HEADER => false, // don't return headers | |
CURLOPT_FOLLOWLOCATION => true, // follow redirects | |
CURLOPT_ENCODING => "", // handle all encodings | |
CURLOPT_USERAGENT => "spider", // who am i |
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
// geo-location shim | |
// currentely only serves lat/long | |
// depends on jQuery | |
;(function(geolocation){ | |
if (geolocation) return; | |
var cache; |
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
<!doctype html> | |
<head> | |
<meta charset="utf-8"> | |
<title></title> | |
<link rel="stylesheet" href="styles.css"> | |
<!--[if lt IE 9]><script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]--> | |
</head> | |
<body> | |
<div id="wrapper"> |
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 | |
$links = shell_exec('egrep -o -r "<a[^<]+?(\w*)</a>" --include=*.html *'); | |
$output; | |
foreach(preg_split("/(\r?\n)/", $links) as $line){ | |
$file = explode(':', $line)[0]; | |
preg_match('/(?<=href=")[^"]+?(?=")/', $line, $url_matches); | |
$url = $url_matches[0]; |
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 | |
/** | |
* @copyright 2012 TheHydroImpulse, Daniel Fagnan | |
* @version 0.1 | |
* @todo Add an overwite ability. Among other things. | |
* @note Use this as you wish. Extend it, Mash it. Enjoy it. | |
*/ |
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
.transparent { | |
/* IE 8 */ | |
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; | |
/* IE 5-7 */ | |
filter: alpha(opacity=50); | |
/* Netscape */ | |
-moz-opacity: 0.5; |
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
.transparent { | |
/* IE 8 */ | |
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; | |
/* IE 5-7 */ | |
filter: alpha(opacity=50); | |
/* Netscape */ | |
-moz-opacity: 0.5; |
OlderNewer