GD and cURL at wamp
Moderator: General Moderators
-
shafiq2626
- Forum Commoner
- Posts: 88
- Joined: Wed Mar 04, 2009 1:54 am
- Location: Lahore
- Contact:
GD and cURL at wamp
hello
how we can check that our GD and cURL is working in our wamp server.
pls help
thanks
how we can check that our GD and cURL is working in our wamp server.
pls help
thanks
- JAB Creations
- DevNet Resident
- Posts: 2341
- Joined: Thu Jan 13, 2005 6:44 pm
- Location: Sarasota Florida
- Contact:
Re: GD and cUEL at wamp
I tried the following though it doesn't work. Unfortunately PHP doesn't do "object detection" like JavaScript does.
I remember some file I had (though can not find when I just looked) that would detect what libraries are present. I'm subscribed because now I'm curious about this too.
Code: Select all
<?php
$ch = curl_init();
if ($ch) {echo 'cURL is supported';}
else if (!$ch) {echo 'cURL is not supported';}
?>- JAB Creations
- DevNet Resident
- Posts: 2341
- Joined: Thu Jan 13, 2005 6:44 pm
- Location: Sarasota Florida
- Contact:
Re: GD and cURL at wamp
Ha! I'm sorry I should have remembered the function function_exists.
You can probably do the same thing with the GD library. Good luck! 
Code: Select all
<?php
if (function_exists('curl_init')) {echo 'cURL is available';}
else {echo 'cURL is not available.';}
?>Re: GD and cURL at wamp
Code: Select all
$ch = curl_init();
if (is_resource($ch))
{echo 'cURL is supported';}
else
{echo 'cURL is not supported';}
- JAB Creations
- DevNet Resident
- Posts: 2341
- Joined: Thu Jan 13, 2005 6:44 pm
- Location: Sarasota Florida
- Contact:
Re: GD and cURL at wamp
php_east, if cURL is not present then that will trigger an error. You gotta test your code out first. 
Re: GD and cURL at wamp
okay,
Code: Select all
if (function_exists('curl_init'))
{
$ch = curl_init();
if (is_resource($ch))
{echo 'cURL is supported';}
else
{echo 'cURL is not supported';}
}
- JAB Creations
- DevNet Resident
- Posts: 2341
- Joined: Thu Jan 13, 2005 6:44 pm
- Location: Sarasota Florida
- Contact:
Re: GD and cURL at wamp
Ah that's cool.
Technically I suppose you could create a function called 'curl_init' but it wouldn't be a resource but rather simply a function I presume?
Re: GD and cURL at wamp
correct.
-
shafiq2626
- Forum Commoner
- Posts: 88
- Joined: Wed Mar 04, 2009 1:54 am
- Location: Lahore
- Contact:
Re: GD and cUEL at wamp
Thanks For This.JAB Creations wrote:I tried the following though it doesn't work. Unfortunately PHP doesn't do "object detection" like JavaScript does.
I remember some file I had (though can not find when I just looked) that would detect what libraries are present. I'm subscribed because now I'm curious about this too.Code: Select all
<?php $ch = curl_init(); if ($ch) {echo 'cURL is supported';} else if (!$ch) {echo 'cURL is not supported';} ?>
I test with ur code then this show with success.
I want to Create New Skin with CubeCart Can u help me how can this possible.
thanks
- JAB Creations
- DevNet Resident
- Posts: 2341
- Joined: Thu Jan 13, 2005 6:44 pm
- Location: Sarasota Florida
- Contact:
Re: GD and cURL at wamp
One thread one topic. That's the point of having a forum. Not only do you might get an answer in a thread others will find the archive version of it too. Start a new thread though you should Google something like that.