PHP Classes

i get a cachable fatal error

Recommend this page to a friend!

      GrabzIt PHP Library  >  All threads  >  i get a cachable fatal error  >  (Un) Subscribe thread alerts  
Subject:i get a cachable fatal error
Summary:wen i hit the submit button cachable error jumps up
Messages:3
Author:janak
Date:2012-05-22 07:12:01
Update:2012-05-22 15:46:18
 

  1. i get a cachable fatal error   Reply   Report abuse  
Picture of janak janak - 2012-05-22 07:12:01
I tired runnin the index.php, but it gives me:
google.com

Catchable fatal error: Object of class GrabzItClient could not be converted to string in /home/hostcint/public_html/sports/grabzit/index.php on line 8


rply soon thnks

  2. Re: i get a cachable fatal error   Reply   Report abuse  
Picture of GrabzIt GrabzIt - 2012-05-22 11:05:40 - In reply to message 1 from janak
Hi,

I have just downloaded the code and tried it for google and it works perfectley.

Have you modified the code at all?

index.php should look like:

<?php
include("GrabzItClient.class.php");
include("GrabzItConfig.php");

if (count($_POST) > 0)
{
$url = $_POST["url"];
$grabzIt = new GrabzItClient($grabzItApplicationKey, $grabzItApplicationSecret);
$grabzIt->TakePicture($url, $grabzItHandlerUrl);
}
?>
<html>
<head>
<title>GrabzIt Demo</title>
</head>
<body>
<h1>GrabzIt Demo</h1>
<form method="post" handler="index.php">
<p>Enter the URL of the website you want to take a screenshot of. Then resulting screenshot should be saved in the <a href="images/">images directory</a>. It may take a few seconds for it to appear!</p>
<p>If nothing is happening check the <a href="http://grabz.it/account/diagnostics">diagnostics panel</a> to see if there is an error.</p>
<label style="font-weight:bold;margin-right:1em;">URL </label><input text="input" name="url"/>
<input type="submit" value="Grabz"></input>
</form>
<br />
<h2>Completed Screenshots</h2>
<iframe id="iFImages" src="images.php" width="100%" height="500px;" style="border:0;overflow-y:auto;"></iframe>
</div>
</form>
<script type="text/javascript">
function reloadIFrame() {
var iframe = document.getElementById('iFImages');
iframe.src = iframe.src;
setTimeout("reloadIFrame()", 5000);
}

reloadIFrame();
</script>
</body>
</html>

  3. Re: i get a cachable fatal error   Reply   Report abuse  
Picture of janak janak - 2012-05-22 15:46:18 - In reply to message 2 from GrabzIt
the file i downloaded was incomplete according the index.php, u provided so would try out and give u the rply.. thnks