Igerslike API Integration into Joomla - open to bidding
$10-30 USD
Geschlossen
Veröffentlicht vor fast 9 Jahren
$10-30 USD
Bezahlt bei Lieferung
I am working on a Igerslike panel and i need someone to help with integrating Igerslike API into my Joomla site. We are doing this through Igerslike API and we need to get it to work.
If you can make it work your hired:
<?php
class igers
{
public $api_url = '[login to view URL]'; // API URL
public $api_key = 'YOURKEY'; // Your API key
public function order($link, $type, $quantity)
{ // Add order
return json_decode($this->connect(array(
'key' => $this->api_key,
'action' => 'add',
'type' => $type,
'amount' => $quantity,
'link' => $link
)));
}
public function status($order_id)
{ // Get status
return json_decode($this->connect(array(
'key' => $this->api_key,
'action' => 'status',
'order' => $order_id
)));
}
private function connect($post)
{
$_post = Array();
if (is_array($post)) {
foreach ($post as $name => $value) {
$_post[] = $name.'='.$value;
}
}
if (is_array($post))
{
$url_complete = join('&', $_post);
}
$url = $this->api_url.$url_complete;
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)');
$result = curl_exec($ch);
if (curl_errno($ch) != 0 && empty($result))
{
$result = false;
}
curl_close($ch);
return $result;
}
}
?>