Hi,
I tested the sample code on this page:
https://developers.google.com/appengine/docs/php/urlfetch/
the script is like this:
$data = array('data' => 'this', 'data2' => 'that');
$data = http_build_query($data);
$context =
array("http"=>
array(
"method" => "get",
"header" => "custom-header: custom-value\r\n" .
"custom-header-two: custome-value-2\r\n" ,
"content" => $data
)
);
$context = stream_context_create($context);
$result = file_get_contents("http://app.com/path?query=update", false,
$context);
However, I always get an error from server like below:
*Warning*: file_get_contents(): php_network_getaddresses: getaddrinfo
failed: A non-recoverable error occurred during a database lookup. in *
C:\gae_work\helloworld\helloworld.php* on line *14*
*Warning*: file_get_contents(http://app.com/path?query=update): failed to
open stream: php_network_getaddresses: getaddrinfo failed: A
non-recoverable error occurred during a database lookup. in *
C:\gae_work\helloworld\helloworld.php* on line *14*
*
*
*
*
*
*
*
*
*
*
Even I use the simplest code, I will get the same error.
<?php
file_get_contents('http://www.google.com');
?>
Any idea?
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.