Wednesday, April 25, 2012

HTTPS support for SOAP in PHP5 under Windows

April 1, 2008
If you’re seeing error messages about missing https wrappers when trying to use SOAP (”Unable to find the wrapper “https” – did you forget to enable it when you configured PHP?” or “[HTTP] SSL support is not available in this build”), you haven’t installed the SSL libraries to support secure transactions.
  1. Uncomment
    extension=php_soap.dll
    in your php.ini
  2. Uncomment
    extension=php_openssl.dll
    in your php.ini
  3. Copy
    ssleay32.dll
    and
    libeay32.dll
    to your windows system32 directory
  4. Reboot apache, et voila!
Source :: http://webponce.com/rants/2008/04/https-support-for-soap-in-php5-under-windows/

Thursday, February 2, 2012

extract ifrmae source url using php

extract ifrmae source url using php


<?php

$str='<iframe width="560" height="315" src="http://www.youtube.com/embed/7VopPJIWIDc" frameborder="0" allowfullscreen></iframe>';

$DOM = new DOMDocument;

$DOM->loadHTML($str); // Your string


//get all anchors

$anchors = $DOM->getElementsByTagName('iframe');


//display all hrefs

for ($i = 0; $i < $anchors->length; $i++){

echo $anchors->item($i)->getAttribute('src');

}


?>



You can check if the node has a srcusing hasAttribute() first if necessary.