Last active
October 29, 2019 16:54
-
-
Save eto4detak/5cd29de557adca902b22881f4ec1f5e7 to your computer and use it in GitHub Desktop.
php
This file contains hidden or 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 | |
| $actual_link = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; | |
| // get array url params | |
| parse_str(parse_url($test_query['$HTTP_REFERER'], PHP_URL_QUERY), $output); | |
| $get_params = array( | |
| 'foo' => 'bar', | |
| 'baz' => 'boom', | |
| 'cow' => 'milk', | |
| 'php' => 'hypertext processor' | |
| ); | |
| http_build_query($get_params); | |
| function gen_uid($l=10){ | |
| return substr(str_shuffle("0123456789abcdefghijklmnopqrstuvwxyz"), 0, $l); | |
| } | |
| // file exist | |
| if (@file_get_contents($filename, 0, NULL, 0, 1)) { | |
| return '<img class="alignleft" src="'.$filename.'" alt="'.$title.'" width="225" height="300" />'; | |
| } | |
| ob_start(); | |
| var_dump($key); | |
| $var = ob_get_clean(); | |
| printf( '<div class="%1$s"><p>%2$s <a href="%3$s">%4$s</a></p></div>', $class, $message, $href, $linkText); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment