Location: PHPKode > scripts > BungeeBones Category and Link Repository > bungeebones-category-and-link-repository/bungeebones.php
<?
/*
Plugin Name: BungeeBones Remotely Hosted Web Directory
Plugin URI: http://BungeeBones.com.com/
Description: The BungeeBones Remotely Hosted Web Directory plugin for Wordpress is an easy way to host a free directory page for your readers, affiliates, advertisers, community, club members, etc. Allow them to submit a simple advertisement listing which not only shows up on your blog but on all the other blogs and websites that also have installed the directory. In addition, their link will continue to be added to all newly installed directories as they join. All submitted links are humanly reviewed for quality assurance.
Version: 0.0.1 Beta
Author: Robert Lefebure
Author URI: http://BungeeBones.com
*/

add_shortcode("bungeebones_directory","bungeebones_directory_shortcode"); //Add ShortCode for "Directory"


//Register Hooks
register_activation_hook(__FILE__,'bungeebones_install');
//Do Actions
do_action("activate_bungeebones-directory/bungeebones-directory.php");
remove_filter('template_redirect', 'redirect_canonical');



function bungeebones_directory_shortcode($atts) {

	global $wpdb;
	extract(shortcode_atts(array('width'=>'100%','name'=>' the BungeeBones Distributed Directory'),$atts));

include('bunbones_config.php');
$var = explode("/", $_SERVER['REQUEST_URI']);
$url_cat = $var[4 + $offset] ;//repnaming header_ID
$cat_page_num = $var[5  + $offset] ;//part 3 of cat series
$cat_page_total = $var[6  + $offset] ;//part 2 of cat series
$pagem_url_cat = $var[7  + $offset] ;//part 2 of cat series
$link_page_id = $var[8  + $offset] ;//part 2 of link series
$link_page_total = $var[9  + $offset] ;//part 3 of link series
$link_record_num = $var[10  + $offset] ;//part 3 of link series
$regional_number = $var[11 + $offset] ;//part 3 of link series

?>

<script type="text/javascript">
/*<![CDATA[*/
function changeText2(){
var arrlength = arguments.length/3;
var arrlengthsc = arrlength+arrlength;
var c = "c";	
var sc = "sc";
for( var i = 0; i < arrlength; i++ ) {
document.getElementById(c+arguments[i]).innerHTML = arguments[arrlength+i];
if(arguments[arrlengthsc+i]){
document.getElementById(sc+arguments[i]).innerHTML = arguments[arrlengthsc+i];
}
}
}

/*]]>*/
</script> 

 
<?
$file="http://Bungeebones.com/link_exchange/index.php/$affiliate_num/$url_cat/$cat_page_num/$cat_page_total/$pagem_url_cat/$link_page_id/$link_page_total/$link_record_num/$regional_number";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $file);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$data3 = curl_exec($ch);
curl_close($ch);
//echo($data);
echo($data2);	
echo($data4);				
echo($data3);				
			
}
?>
Return current item: BungeeBones Category and Link Repository