Internet Marketing Coding

Coding Techniques for Internet Marketing

PHP Obfuscation Example

Published: Wed 9th Feb 2011

I created a PHP Obfuscation tool for my own needs and put it up on the web for anyone to use.

I think it works very well. Here is an example of how it works:

PHP Obfuscator

Input files:
Array
(
[0] => input/answers.php
[1] => input/article.php
[2] => input/functions.php
[3] => input/news.php
[4] => input/video.php
[5] => input/wpt-mashup.php
)

Excluded variables:
Array
(
[0] => $_POST
[1] => $_GET
[2] => $_SERVER
[3] => $wpt_mashup_debug
[4] => $table_prefix
[5] => $wpt_mashup_options
[6] => $wpt_mashup_done_terms
[7] => $post
[8] => $wpdb
[9] => $wpt_news_post_created
[10] => $wpt_video_post_created
)

Variables:
Array
(
[$post_date_gmt] => wpt1
[$num_keywords] => wpt2
[$commentdata] => wpt3
[$description] => wpt4
[$safesearch] => wpt5
[$xml_parser] => wpt6
[$object_id] => wpt7
[$vid_parts] => wpt8
[$timestamp] => wpt9
[$post_date] => wpt10
[$tinterval] => wpt11
[$num_paras] => wpt12
[$questions] => wpt13
[$interval] => wpt14
[$response] => wpt15
[$maxwords] => wpt16
[$question] => wpt17
[$comments] => wpt18
[$nickname] => wpt19
[$article] => wpt20
[$authors] => wpt21
[$keyword] => wpt22
[$matches] => wpt23
[$results] => wpt24
[$content] => wpt25
[$orderby] => wpt26
[$publish] => wpt27
[$comment] => wpt28
[$parents] => wpt29
[$allowed] => wpt30
[$postarr] => wpt31
[$offset] => wpt32
[$result] => wpt33
[$height] => wpt34
[$parent] => wpt35
[$author] => wpt36
[$choice] => wpt37
[$style] => wpt38
[$total] => wpt39
[$video] => wpt40
[$tries] => wpt41
[$value] => wpt42
[$terms] => wpt43
[$width] => wpt44
[$title] => wpt45
[$words] => wpt46
[$items] => wpt47
[$count] => wpt48
[$index] => wpt49
[$query] => wpt50
[$paras] => wpt51
[$appid] => wpt52
[$html] => wpt53
[$word] => wpt54
[$term] => wpt55
[$code] => wpt56
[$pick] => wpt57
[$path] => wpt58
[$para] => wpt59
[$news] => wpt60
[$icon] => wpt61
[$name] => wpt62
[$args] => wpt63
[$cats] => wpt64
[$time] => wpt65
[$item] => wpt66
[$bits] => wpt67
[$next] => wpt68
[$vals] => wpt69
[$data] => wpt70
[$type] => wpt71
[$pid] => wpt72
[$key] => wpt73
[$css] => wpt74
[$url] => wpt75
[$dup] => wpt76
[$bar] => wpt77
[$cat] => wpt78
[$arr] => wpt79
[$sql] => wpt80
[$vid] => wpt81
[$row] => wpt82
[$cid] => wpt83
[$bad] => wpt84
[$s2] => wpt85
[$ok] => wpt86
[$r2] => wpt87
[$nq] => wpt88
[$r3] => wpt89
[$gp] => wpt90
[$qa] => wpt91
[$id] => wpt92
[$np] => wpt93
)

Excluded functions:
Array
(
[0] => wpt_mashup_run
[1] => wpt_mashup_set_object_terms
[2] => wp_insert_post_data
[3] => wpt_mashup_shorten_slug
[4] => wpt_mashup_activation
[5] => wpt_mashup_deactivation
[6] => wpt_mashup_author
[7] => wpt_mashup_inject_css
)

Functions:
Array
(
[wpt_mashup_create_answers_post] => wpt1
[wpt_mashup_create_article_post] => wpt2
[wpt_mashup_check_for_duplicate] => wpt3
[wpt_mashup_get_sooperarticle] => wpt4
[wpt_mashup_create_video_post] => wpt5
[wpt_mashup_create_news_post] => wpt6
[wpt_mashup_article_content] => wpt7
[wpt_mashup_javascript_link] => wpt8
[wpt_mashup_update_comments] => wpt9
[wpt_mashup_yanswers_ap_id] => wpt10
[wpt_mashup_check_interval] => wpt11
[wpt_mashup_filter_string] => wpt12
[wpt_mashup_inject_video] => wpt13
[wpt_mashup_add_comments] => wpt14
[wpt_mashup_parse_videos] => wpt15
[wpt_mashup_news_content] => wpt16
[wpt_mashup_parse_array1] => wpt17
[wpt_mashup_filter_title] => wpt18
[wpt_mashup_filter_links] => wpt19
[wpt_mashup_update_next] => wpt20
[wpt_mashup_video_code] => wpt21
[wpt_mashup_add_author] => wpt22
[wpt_mashup_trim_paras] => wpt23
[wpt_mashup_parse_rss] => wpt24
[wpt_mashup_get_video] => wpt25
[wpt_mashup_category] => wpt26
[wpt_mashup_moderate] => wpt27
[wpt_mashup_question] => wpt28
[wpt_mashup_bad_chrs] => wpt29
[wpt_mashup_keyword] => wpt30
[wpt_mashup_answers] => wpt31
[wpt_mashup_filter] => wpt32
[wpt_mashup_fetch] => wpt33
[wpt_mashup_debug] => wpt34
[wpt_mashup_post] => wpt35
)
The above is the log file of how it obfuscated a premium plugin for WordPress that I developed.

To check out my tool, go to PHP Obfuscator .org

User Icon