Would anyone know how to search an external html file for a work or phrase ?
I was thinking something like this --
I use script cURL...
Code: <?php
if (isset($_POST['submitted'])) {
$xurl_1 = $_POST['url_1'];
$xtext_1 = $_POST['text_1'];
function check_1($url_1, $text_1){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url_1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
$result=curl_exec ($ch);
curl_close ($ch);
preg_match ("|<[pP]>".$text_1."</[pP]>|i", $result, $matches);
if (count($matches)>0){
$i=true;
}else{
$i=false;
}
return $i;
}
if(check_1( $xurl_1, $xtext_1)){
echo "Text found";
}else{
echo "Text not found";
}
} else {
?>
<h3>Link Verifier</h3>
<form action="<?php $_SERVER['PHP_SELF']; ?>" method="post">
<p><b>URL :</b> <input type="text" name="url_1" size="30" value="" /></p>
<p><b> Exist :</b> <input type="text" name="text_1" size="30" value="" /></p>
<div align="center"><input type="submit" name="submit" value="Check" /></div>
<input type="hidden" name="submitted" value="TRUE" />
</form>
<?php
}
?>
Unfortunently, that doesn't work..
it say:
Quote"Fatal error: Call to undefined function curl_init() in /home/*/*/new.php on line 8"
how to install cURL on windows?
SELECT * FROM users WHERE Users are not in Blocked
How do I select all users from users table where there users_id is not stored in the block table
Comma seperated implode & modifying returned string.
I have a PHP post form that posts up to 4 variables. I need whatever variables are passed to be combined into one comma seperated string (eg variable1,variable2,variable3,variable4). This i can do
Email to a friend script problems
I have this send-to-a-friend script with 2 issues:1) When you open the form popup on a particular page, it includes the correct URL for that page (viewable on the popup form). But if you close it, go
Filtering an Array Based on Value
I have a very simple script set up that pulls data from a database and is output using this code:Code: Print "<table border cellpadding=3>";Print
Cloud Computing?
Hello,I was wondering if anyone could help explain this term to me. I'm starting to hear it a lot now. Tried looking up some definitions on it via Google and on Wikipedia but its all really technical
newbie error
what is wrong with this code ? <html><body><?php$conn=odbc_connect('Towel','','');if (!$conn) {exit("Connection Failed: " . $conn);}$sql="SELECT *
Change log of Cost centre change in Plant maintenance order
Hi,
puting for loop in 1 value
hi ,how do i put this code in 1 value:Code: <?phpfor ($i=1; $i<=5; $i++) { echo $i ; }?>the output will be: 12345how do i put the result in one value ,some thing like :if the
delete comma
HI,How to delete "," at the end of the string.Code: $match = 2009/02/03/a2correx03cvbnm,echo preg_replace("/;$/", "HI", "$match");
upload only text files
hi guys i want to upload only text like like (pdf,note pad and ofiice files) so can any one please tell me how can i restrict that