![]() |
|
Welcome to the Computer Webmaster Gaming Console Graphics Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
| |||||||
| PHP PHP for some can be one of the hardest website programming codes, so do you need help on your PHP script, if it is php4, php5 or lower this is the place for you for any PHP help. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 | ||
| The script below, is a script that logs on to my VoIPBuster account and (should) returns the remaining credit. During debugging I found that the script stops at $ch = curl_init(); I get Error message: CALL TO UNDEFINED FUNCTION curl_init(); Can someone please explain what to do? ================================================== ================================= <?php function encryptString($string) { for($i=0; $i < strlen($string); $i++) { if(is_numeric($string[$i])) { if($string[$i] < "5") $string[$i] = $string[$i] + 5; else $string[$i] = $string[$i] - 5; } } return str_rot13($string); } // Set username and password $username = encryptString('yyyyyyyyy'); $password = encryptString('xxxxxx'); $URL = ('https://myaccount.voipbuster.com/clx/index.php?part=plogin&username=' . $username . '&password=' . $password); // INIT CURL $ch = curl_init(); //HERE THE SCRIPT STOPS !! :-( # Setting CURLOPT_RETURNTRANSFER variable to 1 will force cURL # not to print out the results of its query. # Instead, it will return the results as a string return value # from curl_exec() instead of the usual true/false. curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); // EXECUTE 1st REQUEST (FORM LOGIN) $store = curl_exec ($ch); // SET Message curl_setopt($ch, CURLOPT_URL, 'https://myaccount.voipbuster.com/clx/notifications.php'); // ENABLE HTTP POST curl_setopt ($ch, CURLOPT_POST, 1); // SET POST PARAMETERS : FORM VALUES FOR EACH FIELD curl_setopt ($ch, CURLOPT_POSTFIELDS, '?fromlogin=true'); // EXECUTE 2nd REQUEST (Send Message) $content = curl_exec ($ch); // CLOSE CURL curl_close ($ch); /* At this point you can do do whatever you want with the downloaded file stored in $content : display it, save it as file, and so on. */ //we gaan evenetje knippen in de ruwe source code van de returnwaarde //bestudeer de html source en alles wordt duidelijk $start = strpos($content,'balanceid'); //bepaal start van balanceid $deelstring = substr($content,$start+26,10); //kopieer het begin van het bedrag de string naar een tussen waarde //print $deelstring; $einde = strpos($deelstring,'<'); //einde van het bedrag is waar de afsluit tag begint $bedrag = substr($deelstring,0,$einde); print $bedrag; ?> ================================================== ================================= | |||
| | #2 | ||
| Henk oegema wrote: > The script below, is a script that logs on to my VoIPBuster account and > (should) returns the remaining credit. > During debugging I found that the script stops at > $ch = curl_init(); > > I get Error message: > CALL TO UNDEFINED FUNCTION curl_init(); From the php website In order to use PHP's cURL functions you need to install the » libcurl package. PHP requires that you use libcurl 7.0.2-beta or higher. In PHP 4.2.3, you will need libcurl version 7.9.0 or higher. From PHP 4.3.0, you will need a libcurl version that's 7.9.8 or higher. PHP 5.0.0 requires a libcurl version 7.10.5 or greater. Arjen -- http://www.hondenpage.com - mijn site over honden | |||
| Featured Websites | ||||
|
![]() |
| Tags: call, curl_init, function, undefined |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Function tables | ZeldorBlat | PHP | 2 | 05-20-2007 6:33 PM |
| Function tables | Beshoo | PHP | 0 | 05-20-2007 6:33 PM |
| Call Of Duty 3? | Gamer Noob | The Games | 13 | 12-17-2006 12:23 AM |
| Basic Usage Of Php Mail Function | Whatcha | PHP | 3 | 05-11-2006 2:46 AM |
| Featured Websites | ||||
|