This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @author: Sohel Rana | |
* @url: https://blog.sohelrana.me/parsing-xml-multiple-namespaces-using-php/ | |
* @license: MIT | |
* Parsing XML with multiple namespaces using PHP | |
*/ | |
$xmlString = "<en:Envelope xmlns:en=\"http://www.softcare.com/HIPAA/SC/Enrollment/0301\" | |
xmlns:sc=\"http://www.softcare.com/HIPAA/SC/0203\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This function will check the text and find the domain name from test. | |
* If any domain found then it will validate domain name. If domain valid | |
* then return true otherwise return false. | |
* | |
* @param $textString | |
* @return bool | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace app\Components; | |
use Vision\Annotation\SafeSearchAnnotation; | |
use Vision\Request\Image\Base64Image; | |
use Vision\Vision; | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function getLinks($websiteURL) | |
{ | |
$result = array(); | |
$dom = new domDocument; | |
@$dom->loadHTML(file_get_contents($websiteURL)); | |
$dom->preserveWhiteSpace = false; | |
$links = $dom->getElementsByTagName('a'); | |
foreach ($links as $tag) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name app.example.dev; # Write your server name | |
root /var/www/PROJECT/PROJECT_ROOT/; # Write your project root here. | |
access_log /var/log/nginx/PROJECT_ACCESS.log; | |
error_log /var/log/nginx/PROJECT_ERROR.log; | |
location / { | |
index index.php; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @author: Sohel Rana <sohelrana820> | |
* @author URL: https://blog.sohelrana.me/ | |
* @link: https://blog.sohelrana.me/recursively-delete-directory-entire-contents-using-php/ | |
* @licence: MIT | |
* | |
* @param $directory | |
* @return bool | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This is tiny class wrapper for uploading files using Cpanel API | |
* | |
* @author: Sohel Rana <me.sohelrana@gmail.com> | |
* @url: https://blog.sohelrana.me/upload-file-using-cpanel-api/ | |
* @license: MIT | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @author: Sohel Rana <me.sohelrana@gmail.com> | |
* @author URL: http://sohelrana.me | |
* @licence: MIT | |
* @link: https://blog.sohelrana.me/array-chunk-based-on-key-value-in-php/ | |
* | |
* This function is for divide/group/chunk an multidimensional array based on same key. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Class XMLRPCClient | |
*/ | |
class XMLRPCClient | |
{ | |
/** | |
* @var | |
*/ |