Posts
 
Reputation
Joined
Last Seen
Ranked #2K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
100% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
1 Commented Post
0 Endorsements
Ranked #3K
~11.4K People Reached
This member's community profile is only visible to logged in members until they have earned 15 reputation points.

10 Posted Topics

Member Avatar for CodeAngry

# SEO URL Redirection Basics: TUTORIAL # First you can see/get/use some code here. <?php /** * Redirect the visitor to another URL using a proper status code. * * @param string $URL * @param int $StatusCode * @copyright Claude "CodeAngry" Adrian * @license http://www.wtfpl.net/ */ function RedirectURL($URL = null, …

Member Avatar for Gideon_1
0
590
Member Avatar for cancer10

*I appologise for the late reply, but it should help posterity.* Consider [ipcountryphp](http://ipcountryphp.com/) *(my site, my code, my honour)* as it provides a local internet-lifetime freely updated database. It's fast and fully self-contained, pluggable into anything PHP 5.3, SQLite3 and beyond. Very fast seeks and no performance penalties. **Enough with …

Member Avatar for Member #120589
0
2K
Member Avatar for eburlea

<?php $function_names = ['myvalueone','myvaluetwo','myvaluethree','myvaluefour','myvaluefive']; $functions = array(); foreach($function_names as $function_name){ // You need to use (the variable) to import it in the function $functions[$function_name] = function() use ($function_name){ // <-- USE echo 'The name of the function is ', $function_name, PHP_EOL; }; // Store nicely in array call_user_func($functions[$function_name]); // I …

Member Avatar for eburlea
0
362
Member Avatar for MasterHacker110

The problem is that we need to know if the `std::string()` holds the `Windows CP` or `UTF8`, or something else... Decoding is different for each codepage. Also look into `std::wstring_convert` for `UTF8`. @**triumphost**'s solution is unsafe in regards to multibyte `std::string`.

Member Avatar for MasterHacker110
0
4K
Member Avatar for Echo89

<?php /** * Replace stuff in a file. * * @throws InvalidArgumentException if $file is not a proper string * @param path $file * @param string $find * @param string $replace * @param bool $case_insensitive * @return bool */ function find_replace($file, $find, $replace, $case_insensitive = true){ // Validate arguments if(!is_string($file) …

Member Avatar for Echo89
-1
2K
Member Avatar for joshl_1995

Coding tip: **never leave open elses.** Like **if(true) { ...; } else ...;** Alway wrap both sides: **if(true) { ...; } else { ...; }** *You leave yourself open to hard to find bugs with this.*

Member Avatar for joshl_1995
0
168
Member Avatar for hanan-kh

**NuSphere PhpEd** but it costs money. It has no rival in speed. Parses 10s of thousands of lines of php for code completion in seconds. All others choked on my projects *(as in minutes to load)*.

Member Avatar for pritaeas
0
367
Member Avatar for skliz

**Time is a relative thing... consider using GMT time.** Also keep in mind that any **date, time, datetime can be converted to an integer**. And **comparing integers is easy** :)

Member Avatar for CodeAngry
0
727
Member Avatar for rolanduk

Use **headers_sent()** function and see where output started. Then mend it! Also make sure your files don't carry a UTF8 BOM. PHP kind of chokes on it...

Member Avatar for CodeAngry
0
336
Member Avatar for fheppell

**You need to do output buffering.** Parse the markup for **@href** and **@src** attributes and start normalizing them. For **normalizing urls**... it's quite easy. Break by separators '/' into an array *(keep note if it ends in /)*, exclude single dots, exclude two dots and preceeding element *(if any)* in …

Member Avatar for CodeAngry
0
418

The End.