What do you want to save?
Add Code snippet
New code examples
-
PHP 2022-03-02 19:45:04
get_rss_feed php
<?php $url = "https://www.youtube.com/feeds/videos.xml?channel_id=UCbMi18KmKXRb79716KgnVOA"; $xml = simplexml_load_file($url) or die("Error: Cannot create object"); //echo "number of entries: " . count($xml->entry) . &... Add solution -
Javascript 2022-02-25 05:20:02
javascript escape html
function escapeHtml(str) { return str.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;"); } Add solution -
PHP 2022-02-24 15:40:03
php function to convert string to camelcase
public static function camelCase($str, array $noStrip = []) { // non-alpha and non-numeric characters become spaces $str = preg_replace('/[^a-z0-9' . implode("", $noStrip) . ']+/i', ' ', $str); $str = trim($str); ... Add solution -
PHP 2022-02-18 18:45:12
generate jwt token in php
// Create token header as a JSON string $header = json_encode(['typ' => 'JWT', 'alg' => 'HS256']); // Create token payload as a JSON string $payload = json_encode(['user_id' => 123]); // Encode Header to Base64Url String $base64UrlHeader = str_... Add solution
Best helpers
Ranking is empty