Thanks for helping with the original errors, it turned out to be stuck in a loop!
but, as always with computers, you fix one error, and you get a bunch more!
If we comment out the headers and the image copy function, then echo $string we see the google image result for cheese, which is a good sign, however, when we try and make it all work, we get these two errors:
<b>Warning</b>: imagecreatefromjpeg(.jpg): failed to open stream: No such file or directory in <b>/home/sprink54/public_html/index.php</b> on line <b>37</b><br />
<b>Warning</b>: imagecopy(): supplied argument is not a valid Image resource in <b>/home/sprink54/public_html/index.php</b> on line <b>40</b><br />
(sorry it’s in html, browser shows the page as an image)
I’m guessing this means that it doesnt get the image back from google, but I have no idea why :S
Any ideas greatly appreciated