Wwwebber's Blog

Hashmap based on values of a key based array

Posted in free php scripts, hashmap, job search script, sorting arrays by wwwebber on May 26, 2009
I recently had to create a function that would take the values in a key based array and create a hashmap based off of the values. Basically, I had to switch the keys and values. (Remember there are no duplicate keys and I was going to need multiple objects associated with 1 key..this was all part of my free php job search script ) . Anyway, the goal was to take an array like this
$before = array(
“White Plains” => “NY”,
“New York City” => “NY”,
“Philadelphia”    =>”PA”,
“Tampa”            =>”FL”,
“Miami”            =>”FL”
);
</code>
and turn it into

$before = array(
‘NY’ => White Plains,New York City,
‘PA’ => Philadelphia,
‘FL’ => Tampa,Miami
);

function createHashMap(&$mc){
$hashMap = array();

while ($name = current($mc)) {
$key = key($mc);
//echo “key: $key , current:  “. $name . ‘ <br />’;
if(isset($name,$hashMap)){
//            $newKey = substr($key,0,strlen($key)-1) //remove last
$hashMap[“‘”. $name .”‘”] .= $key .’,’ ;
}
else{
$hashMap[“‘”. $name .”‘”] = “‘”. trim($key) .”‘”  ;
}
next($mc);
}

//print em out
foreach($hashMap as $key => $value)
echo $key . ‘ => ‘ . $value . ‘<br />’;
}

createHashMap($before);

Comments Off on Hashmap based on values of a key based array

Php Job Script : Free Job Aggregator

Posted in free php scripts by wwwebber on May 24, 2009

One of my clients wanted to me to create a php job script–not a job portal but rather a script that would allow people to search for all of the jobs that you find on indeed.com

So I made up this script . It is largely open source (1 file is encrpyted…to make sure that the footer links remain intact:) )  Otherwise it is highly customizable and is SEO friendly as the entire script employs mod_rewrite.

How can I earn money with Script?
You can register for your own account at indeed.com and use your own ‘publisher id’ to get some cash for each click that a user makes. Also, from personal experience, I have noticed that cpc for Google Ad’s on my job search pages are decent–though would vary by industry.

Where Can I See a Demo? demo of the default install for the USA and for  India

    Some Sites Using the Script

What are the Server Requirements: Read them here.

Where can I download it ? Here

How can I remove the footer?

  • paypal $50  to  send it here  and I will send you an un-encrypted version. From there, you can do whatever you would like including removing the footer. However, you will need to find the relevant lines of code in the JobRoll.class file and remove them.

How can I get the entire script unecrypted?

  • paypal $50  to  send it here
      Note: there is only 1 file that is enctyped (jobroll.class.php). The script’s style is easily manipulated with cascading style sheets. If you want to do some deep customizations then, yes, it might be worth the the money  to get the unenctyped jobroll.class.php –however, please make sure you are very comfortable with PHP before trying trying this.

What Countries are Supported? USA  and India

Download the script at Hot Scripts: Job Search Script

 

Also, one of the benefits of the script is that it creates literally hundreds of SEO friendly web pages based off of every combination of city state and county. You can see an example of the site map (that can be customized by just changing a variable in the script here: