Jun 13
If you caught the last post, you may have noticed a link to this page before I realized I made a mistake in the code I posted and removed it so here it is again..
Referer (and UA) Cloaking: Two scripts. One for cloaking only to search engine visitors and one for cloaking to both […]
No Comments »
Jun 13
UPDATE 2: The page is no longer in Google’s index. Not sure if it disappeared today or yesterday but it’s gone. Looks like Referer cloaking can catch you penalties with Google. As far as the other engines, Yahoo’s now displaying the page in results and MSN has yet to index it.
UPDATE 1: The experiment page […]
1 Comment »
Jun 09
An example of a super simple login feature for your pages. Simply set the username and password and you’re off. Here’s the code if you don’t feel like going to the Super Simple Login with PHP page.
<html>
<head>
<title>Super Simple Login</title>
</head>
<body>
<?php if($_POST[’username’] !== "YOUR-USERNAME-HERE" && $_POST[’password’] !== "YOUR-PASSWORD-HERE") { ?>
<form action="" method="post">
F: <input type="text" name="username" value="" />
U: […]
No Comments »
Jun 03
Four different ways to scrape websites with PHP. Hopefully these will give you a good idea of how you have many options for pulling down the data you want. The functions are scrape_echo, scrape_write, multi_scrape_echo, and multi_scrape_write and you can check them out here.
No Comments »
Jun 02
I’ve been wanting to understand how Esrun’s cURL multi socket example php script works and thought the URL/Webpage Analysis tool would be a good sandbox considering how slow it was. I say, “was” because however the cURL multi interface works, it’s ridiculously faster than the tried and true file_get_contents so I updated the tool.
No Comments »
Jun 01
I updated two SEO experiments from the SEO section of this site today…
Can I get banned for spammy comments on my blog?
How long does it take to get 1,000 pages indexed?
I haven’t quite hit the “go” button on these experiments yet but I’ll post an update when I do and have something worth writing about.
No Comments »
Jun 01
A very basic implementation of the cURL/PHP that tunnels a URL request through an HTTP proxy. Proxies not included.
<?php function curl_proxy_browse($url) {
$url = "http://adammoro.net/code/php/";
$proxy = "INSERT-PROXY-HERE";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_PROXY, $proxy);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
$data = curl_exec($ch);
curl_close($ch);
return $data;
}
$page = curl_proxy_browse($url);
echo $page;
?>
No Comments »