vraag over checker
het script moet checken of een andere site een link naar mij heeft geplaats
en zo wel of niet een image produceren
dit is backlink.php
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
$found = true = "/images/live.gif";
$found = false = "/images/dead.gif";
function check_back_link($s_link, $http://www.zondata.com/at) {
$match_pattern = preg_quote(rtrim($http://www.zondata.com/at, "/"), "/");
$found = false;
if ($handle = @fopen($remote_url, "r")) {
while (!feof($handle)) {
$part = fread($handle, 1024);
if (preg_match("/<a(.*)href=[\"']".$match_pattern.
"(\/?)[\"'](.*)>(.*)<\/a>/", $part)) {
$found = true;
break;
}
}
fclose($handle);
}
return $found;
header("location: $found = true");
}
else {
header("location: $found = false")
// example:
//if (check_back_link("http://www.all4yourwebsite.com", "http://www.finalwebsites.com")) echo "link exists";
?>
$found = true = "/images/live.gif";
$found = false = "/images/dead.gif";
function check_back_link($s_link, $http://www.zondata.com/at) {
$match_pattern = preg_quote(rtrim($http://www.zondata.com/at, "/"), "/");
$found = false;
if ($handle = @fopen($remote_url, "r")) {
while (!feof($handle)) {
$part = fread($handle, 1024);
if (preg_match("/<a(.*)href=[\"']".$match_pattern.
"(\/?)[\"'](.*)>(.*)<\/a>/", $part)) {
$found = true;
break;
}
}
fclose($handle);
}
return $found;
header("location: $found = true");
}
else {
header("location: $found = false")
// example:
//if (check_back_link("http://www.all4yourwebsite.com", "http://www.finalwebsites.com")) echo "link exists";
?>
dan heb ik hier een code om het debetreffende plaatje dan op te roepen in een andere pagina.
<img src="backlink.php?link={$url}"border=0>
zou iemand mij kunnen adviseren wat ik niet goed heb gedaan
ben nog niet zo'n prof met php
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
$found = true = "/images/live.gif";
$found = false = "/images/dead.gif";
function check_back_link($s_link, $remote_url) {
$match_pattern = preg_quote(rtrim($remote_url, "/"), "/");
$found = false;
if ($handle = @fopen($remote_url, "r")) {
while (!feof($handle)) {
$part = fread($handle, 1024);
if (preg_match("/<a(.*)href=[\"']".$match_pattern.
"(\/?)[\"'](.*)>(.*)<\/a>/", $part)) {
$found = true;
break;
}
}
fclose($handle);
}
return $found;
header("location: $found = true");
}
else {
header("location: $found = false")
// example:
//if (check_back_link("$http://www.zondata.com/at", "$http://www.zondata.com/at")) echo "link exists";
?>
$found = true = "/images/live.gif";
$found = false = "/images/dead.gif";
function check_back_link($s_link, $remote_url) {
$match_pattern = preg_quote(rtrim($remote_url, "/"), "/");
$found = false;
if ($handle = @fopen($remote_url, "r")) {
while (!feof($handle)) {
$part = fread($handle, 1024);
if (preg_match("/<a(.*)href=[\"']".$match_pattern.
"(\/?)[\"'](.*)>(.*)<\/a>/", $part)) {
$found = true;
break;
}
}
fclose($handle);
}
return $found;
header("location: $found = true");
}
else {
header("location: $found = false")
// example:
//if (check_back_link("$http://www.zondata.com/at", "$http://www.zondata.com/at")) echo "link exists";
?>
Test dit is...
Gewijzigd op 01/01/1970 01:00:00 door vdleije .