Search Results
… Use the -I flag (capital i). curl -I https://www.hashbangcode.com/ Use the --head flag. curl --head https://www.hashbangcode.com/ … Sending An HTTP HEAD Request With Curl …
… The Drupal Session Inspector module allows a user to view their current user sessions on a Drupal … deletion feature is especially useful in situations where the user has neglected to log out of a computer. They can just log into the site in … . Originally posted here https://www.codeenigma.com/blog/drupal-session-inspector-module … Drupal 9: Adding Events To The …
Article: Playing With ReactPHP
… getJSON() function. The first parameter of this function is the full URL to our ReactPHP server (including the port), which must contain a … } ); } When we run this code it will send a request to the following URL structure. … run the following command in the directory you want to work from. curl -s https://getcomposer.org/installer | php This will download a …
Article: Getting Started With Zend_Lucene
… Note that when adding documents in this way you should also add the URL of the document as a field so that you can retrieve it later. $doc … $doc->addField(Zend_Search_Lucene_Field::Text('url','http://www. hashbangcode.com/')); $index->addDocument($doc); You … is now presented as a property of this object. So if you set a URL field for your document you can see a list of your documents using …
Article: PHP Custom Stream Wrappers
… and file_get_contents()). * * @param string $path * Specifies the URL that was passed to the original function. * @param string $mode * … stream_wrapper_register('http', 'MockHttpStreamWrapper', STREAM_IS_URL); We pass in 'http' as the stream type and the class name … parameter is any additional flags, which should be set to STREAM_IS_URL if protocol is a URL protocol (which we are setting here). The …
Article: JavaScript Confirm Action Dialog
… is to use the following function. function confirmDelete(delUrl) { if (confirm("Are you sure you want to delete")) { document.location = delUrl; } } For each link that you want to use this function on just … the href with a simple bookmarklet like the following, pass the URL you want to use within this function call. <a …
Article: Testing Multi Step Forms In Drupal 7
… tricky bit here was that when calling the drupalPost() method with a URL it first called drupalGet() on the URL before posting to the form. This basically meant that the form was … the drupalPost() method from running drupalGet() first just supply the URL parameter (the first parameter) of drupalPost() as NULL. This skips …
… within a web page then the current browser window will redirect to the URL. <mx:Script> public function clicked():void { trace('Button clicked'); navigateToURL(new URLRequest('http://www.hashbangcode.com')); } </mx:Script> To create a …
Article: Common Regular Expressions
… Complete URLs https?://(\w*:\w*@)?[-\w.]+(:\d+)?(/([\w/_.]*(\?\S+)?)?)? This will match virtually any URL. HTML Comments <!--{2,}.*?-{2,}--> Inline Code Comments //.* This …
Article: Pretty Print JSON With Python
… "foo": 1 } ] } You can also use this technique for testing scripts or curl requests, in fact anything that produces JSON output can be piped … a web service that produces JSON then you can test this using direct curl commands, which you can then pipe through json.tool to view the output. curl -s http://localhost/service | python -m json.tool What normally …