|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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"; } } ?> |
|
#2
|
|||
|
|||
|
RE: Install question
First and foremost What is you permissions in that directory it listed in the error?
|
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Installation > Install question |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|