Results 1 to 4 of 4

Thread: [RESOLVED] Error with this script...

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2007
    Posts
    190

    Resolved [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?

  2. #2
    WiggleWiggle dclamp's Avatar
    Join Date
    Aug 2006
    Posts
    3,527

    Re: Error with this script...

    1) use header("Location: URL");

    2) What does this script do?
    My usual boring signature: Something

  3. #3
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    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"); 
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Jan 2007
    Posts
    190

    Re: Error with this script...

    Thanks both I'm using the refresh header now.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width