Computer Webmaster Gaming Console Graphics Forum

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.

MK PitStop Main Earn $25 Earn Money Posting Extras Members Blogs Image Hosting User Pages
Go Back   Computer Webmaster Gaming Console Graphics Forum > Webmaster Forum > Website Coding > PHP
Register FAQ/Rules Become A V.I.P. Member Search Today's Posts Mark Forums Read

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.

Google
Closed Thread
 
LinkBack Thread Tools Display Modes
Old 05-20-2007, 6:33 PM   #1
Henk oegema
 
Henk oegema's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default call to undefined function curl_init()

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;
?>
================================================== =================================
 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Old 05-20-2007, 6:33 PM   #2
Arjen
 
Arjen's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default call to undefined function curl_init()

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
 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Featured Websites
Free Space
Free Space
Free Space Free Space
Closed Thread
Tags: , , ,




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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




All times are GMT +1. The time now is 11:57 PM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.0.0
Cheap Computers
MK PitStop Copyright 2005 - 2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98