[RESOLVED] Error with this script...
When I run this script I get this error:-
Fatal error: Call to undefined function curl_init() in cheat.php on line 3
Source:
Code:
<?php
$url="http://google";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
$store = curl_exec ($ch);
curl_close ($ch);
$siteurl = substr($store, 485, 79);
?>
<META http-equiv="refresh" content="3;URL=<?php echo $siteurl; ?>">
Its meant to autorefresh the page.
Does anyone know how to fix this?
Re: Error with this script...
1) use header("Location: URL");
2) What does this script do?
Re: Error with this script...
The curl library is not compiled or enabled as an extension in PHP. This is why you get the error. Also, like suggested use a the HTTP header - there is also a refresh header:
PHP Code:
header("Refresh: 3; url=$siteUrl");
Re: Error with this script...
Thanks both :) I'm using the refresh header now.