<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>
-
URL
<The URL Structure (path only, no root url)>
-
Method:
| app.use(express.methodOverride()); | |
| // ## CORS middleware | |
| // | |
| // see: http://stackoverflow.com/questions/7067966/how-to-allow-cors-in-express-nodejs | |
| var allowCrossDomain = function(req, res, next) { | |
| res.header('Access-Control-Allow-Origin', '*'); | |
| res.header('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE'); | |
| res.header('Access-Control-Allow-Headers', 'Content-Type, Authorization'); | |
| # Install dependencies | |
| # | |
| # * checkinstall: package the .deb | |
| # * libpcre3, libpcre3-dev: required for HTTP rewrite module | |
| # * zlib1g zlib1g-dbg zlib1g-dev: required for HTTP gzip module | |
| apt-get install build-essential \ | |
| zlib1g zlib1g-dbg zlib1g-dev \ | |
| libpcre3 libpcre3-dev libssl-dev libxslt1-dev libxml2-dev libgd2-xpm-dev libgeoip-dev libgoogle-perftools-dev libperl-dev \ | |
| unzip uuid-dev checkinstall |
| <?php | |
| /** | |
| you should this before run this code | |
| composer require mgp25/instagram-php | |
| */ | |
| require_once __DIR__ . '/vendor/autoload.php'; |
| <?php | |
| $text = '#سلام_دنیا'; | |
| if(preg_match('/\#([א-תآ-یÀ-ÿ一-龥а-яا-یa-z0-9\-_]{1,50})/iu',$text)){ | |
| echo $text ." is tag\n"; | |
| }else{ | |
| echo $text ." is not tag\n"; | |
| } |
| if ($request_uri = /) { | |
| set $test A; | |
| } | |
| if ($host ~* teambox.com) { | |
| set $test "${test}B"; | |
| } | |
| if ($http_cookie !~* "auth_token") { | |
| set $test "${test}C"; |
| $(window).on("scroll", function() { | |
| var scrollHeight = $(document).height(); | |
| var scrollPosition = $(window).height() + $(window).scrollTop(); | |
| if ((scrollHeight - scrollPosition) / scrollHeight === 0) { | |
| // when scroll to bottom of the page | |
| } | |
| }); |
| <?php | |
| $files = scandir(__DIR__); | |
| foreach($files as $file){ | |
| $name = explode(".",$file); | |
| unset($name[count($name)-1]); | |
| $name = implode("-",$name); | |
| $name = str_replace(" ","-",$name); | |
| $name = strtolower($name); | |
| $name = preg_replace("/[\-]{1,}/i","-",$name); | |
| echo "Start Convert for " . $name . "\n"; |
| <?php | |
| function slugify($str, $options = array()) { | |
| // https://github.com/phalcon/incubator/blob/master/Library/Phalcon/Utils/Slug.php | |
| // Make sure string is in UTF-8 and strip invalid UTF-8 characters | |
| $str = mb_convert_encoding((string)$str, 'UTF-8', mb_list_encodings()); | |
| $defaults = array( | |
| 'delimiter' => '-', | |
| 'limit' => null, | |
| 'lowercase' => true, |
| RewriteEngine On | |
| RewriteCond %{SERVER_PORT} 80 | |
| RewriteRule ^(.*)$ https://farvisun.ir/$1 [R,L] |