Page 1 of 1
Few Parsing errors..
Posted: Sat Nov 15, 2008 3:46 pm
by Discussnow
Code: Select all
<html>
<form method="post" action="<?php echo $_SERVER['PHP_SELF'];?>">
<title>
Link/Anchor Text Analyzer
</title>
<body>
Paste Website <br>
<textarea name="para" type="text" row="1" col="1">Here</textarea><br>
<input name="send" type="submit" value="Submit!">
<input type="reset" value="Cancel">
</body>
<?php
$url= $_GET['para'];
$data = file_get_contents('https://siteexplorer.search.yahoo.com/search?p=$url');
$regex = '/<td class="info"> <a href="(.+?)"/';
preg_match($regex,$data,$match);
var_dump($match);
echo $match;
?>
</html>
Any help would be appreciated!
Re: Few Parsing errors..
Posted: Sat Nov 15, 2008 3:52 pm
by Syntac
And the errors are...?
Re: Few Parsing errors..
Posted: Sat Nov 15, 2008 3:57 pm
by Discussnow
Syntac wrote:And the errors are...?
Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /home/toiletch/public_html/49ercru.com/Scraper.php on line 14
Warning: file_get_contents(
https://siteexplorer.search.yahoo.com/search?p=$url) [function.file-get-contents]: failed to open stream: no suitable wrapper could be found in /home/toiletch/public_html/49ercru.com/Scraper.php on line 14
array(0) { } Array
Re: Few Parsing errors..
Posted: Sat Nov 15, 2008 4:01 pm
by Syntac
The errors are really quite simple. Your PHP configuration prevents you from accessing files on different servers. Also, file_get_contents() couldn't use the "https" wrapper, probably due to URL file access being disabled.