Skip to content

Commit f7535ec

Browse files
committed
Fix for web service path
1 parent e959d2a commit f7535ec

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"homepage": "https://grabz.it/",
66
"description": "Use our API to allow your app to create images, DOCX documents, rendered HTML and PDF's from URL's or raw HTML. Additionally GrabzIt allows you to convert online videos into animated GIF's or HTML tables into CSV's.",
77
"license": "MIT",
8-
"version":"3.5.0",
8+
"version":"3.5.2",
99
"autoload": {
1010
"psr-4": {
1111
"GrabzIt\\": "lib/"

lib/GrabzItClient.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
class GrabzItClient
1212
{
1313
const WebServicesBaseURL = "://api.grabz.it/services/";
14-
const TakePicture = "takepicture.ashx";
15-
const TakeTable = "taketable.ashx";
16-
const TakePDF = "takepdf.ashx";
17-
const TakeDOCX = "takedocx.ashx";
18-
const TakeHTML = "takehtml.ashx";
14+
const TakePicture = "takepicture";
15+
const TakeTable = "taketable";
16+
const TakePDF = "takepdf";
17+
const TakeDOCX = "takedocx";
18+
const TakeHTML = "takehtml";
1919
const TrueString = "True";
2020

2121
private $applicationKey;
@@ -166,7 +166,7 @@ public function URLToAnimation($url, GrabzItAnimationOptions $options = null)
166166
$options = new GrabzItAnimationOptions();
167167
}
168168

169-
$this->request = new GrabzItRequest($this->getRootUrl() . "takeanimation.ashx", false, $options, $url);
169+
$this->request = new GrabzItRequest($this->getRootUrl() . "takeanimation", false, $options, $url);
170170
}
171171

172172
/*
@@ -521,7 +521,7 @@ public function GetStatus($id)
521521
return null;
522522
}
523523

524-
$result = $this->Get($this->getRootUrl() . "getstatus.ashx?id=" . $id);
524+
$result = $this->Get($this->getRootUrl() . "getstatus?id=" . $id);
525525

526526
$obj = simplexml_load_string($result);
527527

@@ -548,7 +548,7 @@ public function GetResult($id)
548548
return null;
549549
}
550550

551-
$result = $this->Get($this->getRootUrl() . "getfile.ashx?id=" . $id);
551+
$result = $this->Get($this->getRootUrl() . "getfile?id=" . $id);
552552

553553
if (empty($result))
554554
{
@@ -571,7 +571,7 @@ public function GetCookies($domain)
571571

572572
$qs = "key=" .urlencode($this->applicationKey)."&domain=".urlencode($domain)."&sig=".$sig;
573573

574-
$obj = $this->getResultObject($this->Get($this->getRootUrl() . "getcookies.ashx?" . $qs));
574+
$obj = $this->getResultObject($this->Get($this->getRootUrl() . "getcookies?" . $qs));
575575

576576
$result = array();
577577

@@ -613,7 +613,7 @@ public function SetCookie($name, $domain, $value = "", $path = "/", $httponly =
613613

614614
$qs = "key=" .urlencode($this->applicationKey)."&domain=".urlencode($domain)."&name=".urlencode($name)."&value=".urlencode($value)."&path=".urlencode($path)."&httponly=".intval($httponly)."&expires=".urlencode($expires)."&sig=".$sig;
615615

616-
return $this->isSuccessful($this->Get($this->getRootUrl() . "setcookie.ashx?" . $qs));
616+
return $this->isSuccessful($this->Get($this->getRootUrl() . "setcookie?" . $qs));
617617
}
618618

619619
/*
@@ -630,7 +630,7 @@ public function DeleteCookie($name, $domain)
630630

631631
$qs = "key=" .urlencode($this->applicationKey)."&domain=".urlencode($domain)."&name=".urlencode($name)."&delete=1&sig=".$sig;
632632

633-
return $this->isSuccessful($this->Get($this->getRootUrl() . "setcookie.ashx?" . $qs));
633+
return $this->isSuccessful($this->Get($this->getRootUrl() . "setcookie?" . $qs));
634634
}
635635

636636
/*
@@ -692,7 +692,7 @@ public function AddWaterMark($identifier, $path, $xpos, $ypos)
692692

693693
$context = stream_context_create($opts);
694694

695-
$response = @file_get_contents($this->getRootUrl() . 'addwatermark.ashx', false, $context);
695+
$response = @file_get_contents($this->getRootUrl() . 'addwatermark', false, $context);
696696

697697
if (isset($http_response_header))
698698
{
@@ -720,7 +720,7 @@ public function DeleteWaterMark($identifier)
720720

721721
$qs = "key=" .urlencode($this->applicationKey)."&identifier=".urlencode($identifier)."&sig=".$sig;
722722

723-
return $this->isSuccessful($this->Get($this->getRootUrl() . "deletewatermark.ashx?" . $qs));
723+
return $this->isSuccessful($this->Get($this->getRootUrl() . "deletewatermark?" . $qs));
724724
}
725725

726726
/*
@@ -758,7 +758,7 @@ private function _getWaterMarks($identifier = null)
758758

759759
$qs = "key=" .urlencode($this->applicationKey)."&identifier=".urlencode($identifier)."&sig=".$sig;
760760

761-
$obj = $this->getResultObject($this->Get($this->getRootUrl() . "getwatermarks.ashx?" . $qs));
761+
$obj = $this->getResultObject($this->Get($this->getRootUrl() . "getwatermarks?" . $qs));
762762

763763
$result = array();
764764

0 commit comments

Comments
 (0)