PHP Installation
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPHP Installation

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old December 10th, 2003, 09:15 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
Install question

I want to install a script and have done a php script before BUT this one baffles me
First i get this error


Warning: fclose(): supplied argument is not a valid stream resource in /home/cruisepr/public_html/checker/LinkBack


It come with really no instuction and i made a folder and put it in there

When i call for it i get the error on the page

Am i not calling for it right or did i make the folder name wrong >>

here is script

//////////////////////////////////////////////////////////////////////////////
// Configure the following variables //
//////////////////////////////////////////////////////////////////////////////
//This is the text(link) that the script will look for below to see if the
//website checked has it exactly. Remember to put '' before double quotes,
//however the checker will not be looking for them.
$link_to_look_for = "http://www.cruisewarehouse.cc";


// These are the sites that will be checked to see if the previous link is present.
// Add as many links here as you want, using the form $url[] = "address";
$url[] = "http://cruisewarehouse.cc/links/links.php?&cat=1&offset=20";
$url[] = "http://www.website-2.com";
$url[] = "http://www.website-3.com";
//////////////////////////////////////////////////////////////////////////////
// DO NOT CHANGE ANYTHING BELOW THIS LINE //
//////////////////////////////////////////////////////////////////////////////
function removeComments ($pageText) {
if(strstr($pageText,'<!')) {
$start = strpos($pageText, '<!');
$comment = strstr($pageText, '<!');
$length = strpos($comment, '->') + 2;
$pageText = substr_replace($pageText, '', $start, $length);
// recursive function so that it continues removing comments untill there are none left.
$pageText = removeComments ($pageText);
return $pageText;
} else {
return $pageText;
}
}
function checkPage($url, $search) {
$file = file($url);
for ($i=0; $i<count($file); $i++) {
$pageText = $pageText . $file[$i];
}
fclose($file);
$pageText = htmlentities($pageText);
$pageText = removeComments($pageText);

if (eregi(htmlentities($search), $pageText)) {
return true;
} else {
return false;
}
}

for ($c=0; $c<count($url); $c++) {
if (checkPage($url[$c], $link_to_look_for) == "true") {
echo $url[$c] . " <font color="green">Link Found</font><br><br>nn";
}
else {
echo $url[$c] . " <font color="red">Link Not Found</font><br><br>nn";
}
}
?>


Reply With Quote
  #2  
Old December 11th, 2003, 01:57 AM
postalcow postalcow is offline
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Ford CIty, PA USA
Posts: 1,267 postalcow User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
Send a message via Yahoo to postalcow
RE: Install question

First and foremost What is you permissions in that directory it listed in the error?

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Installation > Install question


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway