Explorar o código

changed README

Valeriy %!s(int64=11) %!d(string=hai) anos
pai
achega
6167ea2918
Modificáronse 1 ficheiros con 31 adicións e 0 borrados
  1. 31 0
      README.md

+ 31 - 0
README.md

@@ -64,6 +64,37 @@ if($response->getStatus() === 200) {
 }
 }
 ```
 ```
 
 
+
+Request a URL with delay and output the reponse:
+
+```php
+<?php
+
+use JonnyW\PhantomJs\Client;
+
+$client = Client::getInstance();
+
+/** 
+ * @see JonnyW\PhantomJs\Message\Request 
+ **/
+$request = $client->getMessageFactory()->createRequest('GET', 'http://google.com');
+
+/** 
+ * @see JonnyW\PhantomJs\Message\Response 
+ **/
+$response = $client->getMessageFactory()->createResponse();
+
+// Send the request with delay in miliseconds
+$client->send($request, $response, $delay = 5000);
+
+if($response->getStatus() === 200) {
+	
+	// Dump the requested page content
+	echo $response->getContent();
+}
+```
+
+
 Request a URL, save a screen capture to provided location and return the response:
 Request a URL, save a screen capture to provided location and return the response:
 
 
 ```php
 ```php