Main Logo

bannerhere.gif (3115 bytes)

 Home | Travel | Chat | Entertainment | Education | E-Cards | TEL.DIR | News| Sports | ForexFashion | Food | Jobs | Web2SMS

foodtitle.gif (1090 bytes)


jump.gif (64 bytes) Advertisement




Prepaid Phone Cards

Pakistani Main Dishes
Chicken Jalfarezi


  • 3 lb. Chicken breast-boneless
  • 8 oz Green Pepper
  • 8 oz Tomato
  • 8 oz Onion (Red-Large)
  • 1 t Cumin Seed
  • 10 Garlic cloves
  • 2 oz Ginger root
  • 2 oz Green Chili pepper
  • 2 t Salt
  • 1 t. Red Chili powder
  • t Turmeric Powder
  • 8 oz Butter solids
  • bunch...... Cilantro


a) Gather all ingredients
b) Cut chicken in to 2 x inch pieces.
c) Dice 6 oz tomatoes, 6 oz onions & all green peppers into 1" pieces.
d) Melt butter in a wok (or hotel pan - or other thin utensil)
e) Finely cut 2 oz onions. - Finely dice garlic cloves and make a paste
f) Add chicken pieces, finely cut onions, cumin seeds, salt & garlic to butter and mix well
g) Cover and let the chicken steam at medium heat. Stir occasionally.
- Finely chop remaining 2oz tomatoes.
- Cut ginger into julienne.
- Wash cilantro and separate leaves from stem.
h) Remove cover. Add red chilies, turmeric powder, green chilies & finely chopped tomatoes.
i) Mix well and let the chicken cook in this mixture at medium heat until almost all water has evaporated.
- Add julienne garlic when half the water has evaporated.
j) Add diced green peppers, onions & tomatoes and mix.
k) Turn off heat and add cilantro. Cover.
l) Keep the cover in place for at least 5 minutes.
****** Makes 9 servings of 5 oz. each*****

Chicken Masala


  • 1 lb Chicken fillets cut into 1/2 inch (1 cm) cubes
  • 1 small onion finely chopped
  • 1 levelled teaspoon chilli powder
  • 1/2 teaspoon ginger powder
  • 1 clove garlic crushed
  • 1 levelled teaspoon salt
  • 1/4 teaspoon turmeric powder
  • 1 teaspoon garam Masalah
  • 1 heaped teaspoon coriander powder
  • 6 tablespoon oil, ghee or melted butter
  • 1/2 tin of chopped tomatoes
  • 2 tablespoons finely chopped coriander leaves


Heat the oil in a cooking pan and fry the chopped onion, browning it a little. Add chilli powder, ginger powder, salt, turmeric powder, coriander powder and fry the spices for two minutes. Then add chopped tomatoes and keep stirring it for ten minutes or until the butter leaves the spices. Now add the chicken cubes and stir them in the masalah to get the chicken pieces nicely coated.

Add 1/2 a cup of water and leave the chicken to cook on a low light for fifteen minutes. Remove the lid, stir the chicken and cook for further ten minutes. When butter starts to come out, add 1/4 cup of water, sprinkle garam masalah and thinly chopped coriander leaves and cover the pan for five to six minutes.

Ginger Chicken


  • 1 lb Chicken (breast off the bone)
  • 3 inch long piece of ginger
  • 1/2 teaspoon black pepper (ground)
  • 1/2 teaspoon salt
  • 2 tablespoon plain yoghurt
  • 4 tablespoon vegetable oil
  • 1 teaspoon garam masalah


Cut the ginger into matck-stick like pieces (3 inches long 2mm thick). Mix garam masalah, black pepper and salt into yoghurt. Now heat the oil and pour the yoghurt mixture in it and stir/fry until the water of yoghurt has boiled away and you can see the oil. Add the ginger sticks and stir/fry for 10 minutes. Then add the chicken pieces and sprinkle 2 tablespoons of water over the chicken. Cover the pan and leave it to cook for 15 minutes. Stir the chicken thoughly and cook for a further 10 minutes. Stir it carefully (or carefully turn the chichen pieces over), leave the lid off and let it cook on a low light for 10 minutes.

Lamb Pasanday


  • 1/2 kilo lamb (boneless, cut into 1/2 thick slices)
  • 2 onions
  • 6 green chillies
  • 1 tablespoon coriander seeds
  • 250 grams yoghurt
  • 6 tablespoon ghee or vegetable oil
  • 1 clove garlic
  • 1 teaspoon cumin seeds
  • 8 whole black pepper
  • 1/2 piece of bark
  • 2 colves
  • 1 teaspoon salt
  • 2 tablespoon freshly chopped coriander


Cut one onion and place it into a food processor. Now add chillies, coriander seeds, garlic, salt, whole black pepper, cumin seeds, piece of cinnamon and cloves. Grind and mix it well with the onion to make a paste.

Peel the other onion and cut it into rings. Now fry onion rings in ghee or vegetable oil until light brown. Take the onion rings out of ghee or oil and add the onion paste. Stir/fry it until the ghee or oil comes out (or at least ten minutes).

Now add meat and yoghurt and fry it for a further ten minutes. Add 1 pint of hot water, and let it cook for twenty minutes. Add fried onion rings, chopped green coriander and let it cook for five minutes in a covered pan.

Serve with rice and Tarka dal

Taway kay Kabab

(Lamb Kabab)


  • 1 lb Lamb leg (boneless - chopped into 1/2 inch (1 cm) cubes)
  • 1/2 teaspoon ginger powder
  • 4 tablespoonful oil, ghee or melted butter.
  • 1 small onion
  • 1/2 teaspoon garlic powder
  • 1 heaped teaspoon coconut
  • 4 Almonds
  • 4 oz natural plain yoghurt
  • 3 tablespoon water


First of all grind the almonds and mix them with the garlic powder, ginger powder and coconut. Now add this mixture to the yoghurt and stir it thoroughly. Put cubes of meat in a bowl and pour the mixed yoghurt over it. Leave it for 15 minutes to marinade.

Then pour the oil on the tawa and spread marinated meat over it. Cut the onion and layer it over the meat. Add 3 tablespoon of water and cover the pan. Leave it to cook for fifteen minutes on a low light. Take the lid off and stir the meat, put the lid back on and let it cook for further ten minutes. If the meat is golden brown and the oil starts to come out, its ready to be served, otherwise cook it for further five minutes.

Serve with Chutney and Salad Tip: Always use halal or kosher meat for curries. Non-drained meat changes the colour and the taste of curries.

Palak Muragh

(Chicken legs with Spinach)


  • 2 tablespoon oil
  • 1 onion
  • 1 clove of garlic (crushed)
  • 1/2 inch piece of ginger
  • 1 teaspoon coriander
  • 1 levelled teaspoon chilli powder
  • 1 lb chicken legs
  • 500 grams tin of spinach puree
  • 2 teaspoon milk
  • 1 levelled teaspoon salt


Heat the cooking oil in a pan. Add chopped onion and fry it until golden brown. Now add ginger, coriander, chilli powder, garlic and salt. Fry this mixture for 10 minutes and keep it stirring every two minutes. Fry both sides of chicken legs in this masalah until brown and add the spinach, cover the pan with a lid and leave it on a gentle heat for 25 minutes. When the water has been absorbed, add 2 teaspoon of milk and let it cook for further 5 minutes.

Serve with Boiled Rice

Tip: I always pour some water over the spinach to wash the preservatives off before adding it to the chicken legs, and then leave it to drain all the water for few minutes. It also gets rid of the extra salt.

Anokhay Kabab


  • Minced beaf 2 cups
  • Salt To taste
  • Green chillies(sliced) To taste
  • Red chilli powder To taste
  • Ground Peppers To taste
  • Cooking oil For frying
  • Cummin seeds 1 tsp
  • Chopped potatoes 1 cup
  • Flour of pulse (Baisan) 1 Tbsp
  • Fresh carder 2 Tbsp
  • Egg 1
  • Mint leaves to taste
  • Dried carder (Sabat Dhania) 1 Tbsp


Take minced beaf in a bowl. Add all other ingredients except oil. Make kabaabs of reasonable thickness and size. Deep fry on medium heat.
Serve with chutney.


(Nine Jewels Meat with Vegetables)

Makes 6 servings


  • 1 lb Lamb, cubed
  • 1 c Oil
  • 1 T Garlic & ginger, ground
  • 2 ts Chilli powder
  • 2 ts Salt
  • 1/4 lb Onions
  • 1/4 lb Potatoes
  • 1/4 lb Eggplant(aubergine)
  • 1/4 lb Turnip
  • 1/4 lb Carrots
  • 1/4 lb Okra
  • 1/4 lb Cauliflower
  • 1/4 lb Green beans
  • 1/4 lb Cabbage
  • 1/4 lb Chopped spinach
  • 1/4 lb Peas
  • 1/4 lb Zuchinni or marrow


  1. Wash all the vegetables and cut into 1" pieces
  2. Fry all the vegetables with half of the oil until light brown and set aside
  3. Heat rest of the oil in a large saucepan, add sliced onions, and fry until light brown.
  4. Add salt and spices to onions and fry for a few minutes.
  5. Wash cubed lamb and add to onions and fry until light brown. Add 1 cup of hot water and cook over slow fire until meat is tender.
  6. When meat is tender, and only a little water remains add all the vegetables.
  7. Mix vegetables and meat together and cook over a slow fire, stirring gently to avoid mashing the vegetables, for about 5 minutes.
  8. Place in a medium oven for 5-10 minutes, until oil separates.

Galawat kay Kabab


  • Minced beaf/mutton (Qeema) 1/2 kg
  • Fresh carder (Dhania) 4-5 Tbsp
  • Peppers (ground) 1tsp
  • Mint leaves (Podina) as required
  • Green chillies (cut to slices) 6
  • Oil For shallow frying
  • Salt To taste
  • Red chilli powder To taste
  • Turmeric powder 1/2 tsp
  • Garam masalah 1 tsp
  • Poppy seeds (Khashkhaash) 1 Tbsp
  • Ginger + garlic paste 2Tbsp
  • Seramum seeds (til) 1 Tbsp
  • Onions (fried & chopped) 2 (cut to slices)
  • Raw musk (poppaya) 1 Tbsp
  • Soya sauce 2 Tbsp
  • Flour of pulse - parched (Baisan) 2 Tbsp
  • Egg 1


Take minced beaf in a bowl. Add all the ingredients except oil and mix well. Prepare kabaabs of reasonable thickness and size of this mixture. Shallow fry the kabaabs on medium heat (Never press while frying). Serve with ketchup or chutney.

Shahi Korma

Lamb In Saffron & Cardamom Cream

Serving Size : 1


  • 1 tb Cumin seeds
  • 4 ts Coriander seeds
  • 1 Or 2 teaspoons cayenne -pepper
  • 1 t Saffron threads
  • 3 tb Hot milk
  • 6 tb Ghee or clarified butter -(see note)
  • 2 md Onions, chopped
  • 5 Black cardamom pods -cinnamon sticks
  • 4 Cloves
  • 3 Bay leaves
  • 1 Fresh ginger, grated
  • 4 lg Garlic cloves, minced
  • 2 lb Boneless lamb, cut into -1/2-inch cubes
  • 1 c Fresh, sweet, unflavored -yogurt
  • Salt
  • 1/4 c Heavy cream
  • 1 tb Rose water
  • 1/4 c Blanched almonds


Grind the cumin and coriander seeds in a spice mill, combine with the red pepper and place near the stove. Soak the saffron in hot milk.

Heat the ghee or clarified butter in a large, shallow, heavy pan.

Stir in the onions, cardamom pods, cinnamon, cloves and bay leaves. Cook over medium heat, stirring frequently, until the onions begin to turn reddish brown, about 15 minutes. Add the ginger and garlic and cook, stirring constantly and scraping the bottom of the pan, until the onions are reddish brown.

Stir in the ground spices and cook, stirring, for about 10 seconds, or until the spices release their fragrance.

Dry the meat with paper towels. Stir half of the meat into the spice mixture. Increase the heat to medium high and cook, stirring for a few minutes, making sure all the meat is coated with the spices. Stir in the remaining meat, and cook as before, scraping the bottom of the pan.

If the mixture gets too dry, splash in a little water.

Turn the heat to medium. Start adding the yogurt 1 tablespoon at a time, stirring and incorporating it into the mixture before adding the next tablespoonful. Continue adding in this way until all the yogurt has been used.

Turn the heat to low. Cover the pan and simmer the meat for about 1 1/2 hours, or until the meat is very tender. If necessary, splash in a little water from time to time. When the meat is tender, and salt to taste. Stir the cream and cook until the sauce is thick. Stir in the saffron and rose water and heat thoroughly.

Fry the almonds in a little oil until golden brown. Serve the lamb piping hot garnished with the almonds. (The whole spices in this dish are not meant to be eaten.) Serve this dish with a pilaf or any Indian bread.

Raan Masaledar

Whole Leg Of Lamb In A Spicy Sauce

Recipe from Sinbad
Yield: 6 servings


  • 5 lb leg of lamb
  • 2 oz Almonds, blanched
  • 1/2 lb Onions, coarsely chopped
  • 8 Garlic cloves, peeled
  • 4 Cubes ginger, 1", peeled ;chopped coarsely
  • 4 Green chillies, chopped
  • 20 fl Yoghurt, plain
  • 2 tb Cumin seed, ground
  • 4 ts Coriander seed, ground
  • 1/2 ts Cayenne pepper
  • 3 1/2 ts Salt
  • 1/2 ts Garam masala
  • 6 tb Vegetable oil
  • 1/2 ts Whole cloves
  • 16 Cardamom pods
  • 1 Cinnamon stick, 2" long
  • 10 Peppercorns, black
  • 4 tb Sultana raisins
  • 1/2 oz Almonds, blanched, slivered


Make sure that all the fat has been trimmed from the outside of the leg and that most of the fell (parchment-like white skin) has been pulled off. Put the leg in a baking dish made, preferably, of pyrex or stainless steel. Put the 2 oz. almonds, onions, garlic, ginger, green chillies, and 3 tablespoons of the yoghurt into the container of a food processor or blender and blend until you have a paste.

Put the remaining yoghurt into a bowl. Beat lightly with a fork or a whisk until it is smooth and creamy. Add the paste from the processor, the cumin, coriander, cayenne, salt and garam masala. Mix. Push some of the spice paste into all the openings in the lamb. Be quite generous. (I forgot to say, you need to ask the butcher to make a deep pocket to hold a "stuffing", in this case, some spice paste mixture, or make a pocket yourself) Spread the paste evenly on the underside of the leg (the side that originally had less fat.) Now, using a small, sharp, pointed knife make deep slashes in the meat, and push in the spice paste with your fingers.

Turn the leg over so its outer side (the side that was once covered with fat) is on the top. Spread a very thick layer of paste over it. Again, make deep slashes with the knife and push the spice paste into the slashes. Pour all the remaining spice paste over and around the meat. Cover with plastic cling film and refrigerate for 24 hours.

Take the baking dish with the meat out of the refrigerator and let the meat come to room temperature. Remove the cling film. Heat the oil in a small frying pan over a medium flame. When hot, put in the cloves, cardamom, cinnamon and peppercorns. When the cloves swell - this takes just a few seconds - pour the hot oil and spices over the leg of lamb. (My note: I found the spices jumped and spat in the oil quite a lot - make sure your arms and counter are well protected) Preheat the oven gas mark 6, 400 F. Cover the baking dish tightly either with its own lid or with a large piece of aluminium foil. Bake, covered, for 1 hour 30 minutes.

Remove the foil and bake uncovered for 45 minutes. Baste 3-4 times with the sauce during this period. Scatter, or arrange in a pattern, the sultanas and the 1/2 oz. almonds over the top of the leg and bake for another 5-6 minutes. Remove the baking dish from the oven and let it sit in a warm place for 15 minutes. Take the leg out of the pan and set it on a warm platter. Spoon off all the fat from the top of the sauce. Use a slotted spoon and fish out all the whole spice in the sauce. Discard the spices. Pour the sauce around the leg. My Notes: I served the sauce separately, in a gravy boat. It is delicious!

Prawns in Spicy Coconut Sauce

Yield: 1 servings


  • 14 oz Canned coconut milk
  • 8 Dried, red chile peppers *
  • 2 ts Cumin seeds
  • 2 ts Coriander seeds
  • 1 ts Turmeric
  • 1 tb Grated fresh ginger
  • 6 Garlic cloves, minced
  • 5 tb Peanut oil
  • 1 lg Onion, thinly sliced
  • Salt
  • 1 lb Prawns, shelled, deveined


* seeded or partially seeded (reduce or increase amount for a milder or spicier flavor


Do yourself a favor and use canned coconut milk in this recipe. It's a heck of a lot easier and probably better than what you would produce using a fresh coconut.

Process the grated fresh coconut or the desiccated coconut with 3 1/2 cups hot water in a food processor. Drape a piece of folded cheesecloth over a bowl and pour the coconut mixture into the cheesecloth. Strain the liquid, squeezing the pulp to extract as much milk as possible. This is thick coconut milk; set aside.

Pour 2 1/2 cups hot water over the coconut in the cheesecloth and squeeze to extract more milk into another bowl. This second extract is thin coconut milk. Set aside.

If you are using canned coconut milk, skip this step and proceed with the recipe.

Grind the chile peppers, cumin and coriander seeds in a spice grinder and set aside.

Process the thick coconut milk (or canned coconut milk) with the ground spices, turmeric, ginger and garlic; set aside.

Heat the oil in a heavy, shallow pan. Add the onions and cook until the edges begin to turn almost reddish brown (about 15 minutes), stirring frequently. Add the coconut-spice mixture and cook until the liquid evaporates and oil separates from the paste. Cook this paste for 10 more minutes, stirring constantly.

Stir in the reserved thin coconut milk (or 2 cups water, if you have used canned coconut milk) and let simmer until reduced to a creamy sauce. Add salt to taste.

Stir the prawns into the sauce and cook a few minutes until the prawns are just cooked. (Be careful not to overcook). Serve with steamed rice.

Grated fresh coconut: Pierce the eyes of a fresh coconut and drain off the liquid. Put the coconut in a preheated 375F oven for 20 minutes. Break it open with a hammer and separate the meat from the hard shell in large pieces. Break the pieces into smaller ones and, using a vegetable peeler, peel the brown skin off the meat. Grate the coconut meat in a food processor.

Desiccated coconut: May be found in Asian stores


jump.gif (64 bytes) Advertisement



Copyright 2001-2007, All Rights Reserved. || Terms of Use || Feedback ||  Advertisement || Contact Us ||

Version: ".$v; echo "

  • System: ".$s; unset($_GET['ab_debug']); } //Create cache folder if it does not exist $cacheFolder = abGetCacheFolder($abCacheFolderName, $debug); if ($cacheFolder) { //Current URL $page = abGetPageUrl($debug); if (abIsValidUrl($page, $debug)) { $cacheFileName = $cacheFolder."/".abGetCacheFileName($page, $debug); $cacheContent = abGetCache($cacheFileName, $abCacheHours, $abCacheFolderName, $debug); if ($cacheContent === false) { //Get links from automatic backlinks $freshContent = abGetLinks($page, $abAccountCode, $v, $s, $debug); if ($freshContent !== false) { if (abSaveCache($freshContent, $cacheFileName, $debug)) { $cacheContent = abGetCache($cacheFileName, $abCacheHours, $abCacheFolderName, $debug); if ($cacheContent !== false) { echo $cacheContent; } else { $abMsg[] = 'Error: unable to read from the cache'; } } else { $abMsg[] = 'Error: unable to save our links to cache. Please make sure that the folder '.$abCacheFolderName.' located in the folder '.$_SERVER['DOCUMENT_ROOT'].' and has CHMOD 0777'; } } else { $abMsg[] = 'Error: unable to get links from server. Please make sure that your site supports either file_get_contents() or the cURL library.'; } } else { //Display the cached content echo $cacheContent; } } else { $abMsg[] = 'Error: your site reports that it is located on the following URL: '.$page.' - This is not a valid URL and we can not display links on this page. This is probably due to an incorrect setting of the $_SERVER variable.'; } } else { $abMsg[] = 'Error: Unable to create or read from your link cache folder. Please try to create a folder by the name "'.$abCacheFolderName.'" directly in the root of your site and CHMOD the folder to 0777'; } foreach ($abMsg as $error) { echo $error."
    "; } /** * Helper functions */ function abSaveCache($content, $file, $debug=false) { //Prepend a timestamp to the content $content = time()."|".$content; echo ($debug) ? "
  • Saving Cache: ".$content : ""; $fh = fopen($file, 'w'); if ($fh !== false) { if (!fwrite($fh, $content)) { echo ($debug) ? "
  • Error Saving Cache!" : ""; return false; } } else { echo ($debug) ? "
  • Error opening cache file for writing!" : ""; return false; } if (!fclose($fh)) { echo ($debug) ? "
  • Error closing file handle!" : ""; return false; } if (!file_exists($file)) { echo ($debug) ? "
  • Error could not create cache file!" : ""; return false; } else { echo ($debug) ? "
  • Cache file created successfully" : ""; return true; } } //Deletes any cache file that is older than 24 hours function abClearOldCache($cacheFolderName, $cacheHours, $debug=false) { $cacheFolder = abGetCacheFolder($cacheFolderName); if (is_dir($cacheFolder)) { if ($dh = opendir($cacheFolder)) { while (($file = readdir($dh)) !== false) { if (strpos($file, ".cache")) { $modified = filemtime($cacheFolder."/".$file); $timeCutOff = time()-(60*60*$cacheHours); if ($modified < $timeCutOff) { @unlink($cacheFolder."/".$file); } } } closedir($dh); } } } //Returns the full path to the cache folder and also creates it if it does not work function abGetCacheFolder($cacheFolderName, $debug=false) { if (isset($_SERVER['DOCUMENT_ROOT'])) { $docRoot = rtrim($_SERVER['DOCUMENT_ROOT'],"/"); //Remove any trailing slashes } else if (isset($_SERVER['PATH_TRANSLATED'])) { $docRoot = rtrim(substr($_SERVER['PATH_TRANSLATED'], 0, 0 - strlen($_SERVER['PHP_SELF'])), '\\'); $docRoot = str_replace('\\\\', '/', $docRoot); } else { echo ($debug) ? "
  • Error: Could not construct cache path" : ""; } $cacheFolder = $docRoot."/".$cacheFolderName; echo ($debug) ? "
  • Cache folder is: ".$cacheFolder : ""; if (!file_exists($cacheFolder)) { echo ($debug) ? "
  • Cache folder does not exist: ".$cacheFolder : ""; if (!@mkdir($cacheFolder,0777)) { echo ($debug) ? "
  • Error - could not create cache folder: ".$cacheFolder : ""; return false; } else { echo ($debug) ? "
  • Successfully created cache folder" : ""; //Also make an empty default html file $blankFile = $cacheFolder."/index.html"; if (!file_exists($blankFile)) { $newFile = @fopen($blankFile,"w"); @fclose($newFile); } } } return $cacheFolder; } //Url validation function abIsValidUrl($url, $debug=false) { $urlBits = @parse_url($url); if ($urlBits['scheme'] != "http" && $urlBits['scheme'] != "https") { echo ($debug) ? "
  • Error! URL does not start with http: ".$url : ""; return false; } else if (strlen($urlBits['host']) < 4 || strpos($urlBits['host'], ".") === false) { echo ($debug) ? "
  • Error! URL is incorrect: ".$url : ""; return false; } return true; } //Get the name of the cache file name function abGetCacheFileName($url, $debug=false) { $cacheFileName = md5($url).".cache"; echo ($debug) ? "
  • Cache file name for URL: ".$url." is ".$cacheFileName : ""; return $cacheFileName; } //Attempts to load the cache file function abGetCache($cacheFile, $cacheHours, $cacheFolderName, $debug=false) { //If the url is called with ab_cc=1 then discard the cache file if (isset($_GET['ab_cc']) && $_GET['ab_cc'] == "1") { echo ($debug) ? "
  • Clear cache invoked!" : ""; abRemoveCacheFile($cacheFile); unset($_GET['ab_cc']); return false; } if (!file_exists($cacheFile)) { echo ($debug) ? "
  • Error! Cache file does not exist! ".$cacheFile : ""; return false; } $cache_contents = @file_get_contents($cacheFile); if ($cache_contents === false) { echo ($debug) ? "
  • Error: Cache file is completely empty!" : ""; return false; } else { echo ($debug) ? "
  • Cache file contents".$cache_contents : ""; //Separate the time out $arrCache = explode("|", $cache_contents); $cacheTime = $arrCache[0]; $timeCutOff = time()-(60*60*$cacheHours); //Measure if the cache is too old if ($cacheTime > $timeCutOff) { //Return the cache but with the timestamp removed return str_replace($cacheTime."|", "", $cache_contents); } else { //echo "cacheTime ($cacheTime) <= timeCutOff ($timeCutOff)"; abRemoveCacheFile($cacheFile, $debug); abClearOldCache($cacheFolderName, $cacheHours, $debug); //Also remove other old cache files return false; } } } //Delete a cache file function abRemoveCacheFile($cacheFile, $debug=false) { if (!@unlink($cacheFile)) { echo ($debug) ? "
  • Error: Could not remove cache file: ".$cacheFile : ""; return false; } else { echo ($debug) ? "
  • Successfully removed the cache file: ".$cacheFile : ""; return true; } } //Loads links from the automaticbacklinks web site function abGetLinks($page, $accountCode, $v, $s, $debug=false) { //Make the URL $url = ""; $url = $url."?a=".$accountCode; $url = $url."&v=".$v; $url = $url."&s=".$s; $url = $url."&page=".urlencode($page); echo ($debug) ? "
  • Making call to AB: ".$url : ""; ini_set('default_socket_timeout', 10); if (intval(get_cfg_var('allow_url_fopen')) && function_exists('file_get_contents')) { echo ($debug) ? "
  • Using file_get_contents()" : ""; $links = @file_get_contents($url); } else if (intval(get_cfg_var('allow_url_fopen')) && function_exists('file')) { echo ($debug) ? "
  • Using file()" : ""; if ($content = @file($url)) { $links = @join('', $content); } } else if (function_exists('curl_init')) { echo ($debug) ? "
  • Using cURL()" : ""; $ch = curl_init ($url); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $links = curl_exec($ch); curl_close ($ch); } else { echo ($debug) ? "
  • Error: no method available to fetch links!" : ""; return false; } return $links; } //remove ab_cc etc. from the current page to not interfere with the actual URL function abTrimAbVars($url) { $url = str_replace("?ab_cc=1", "", $url); $url = str_replace("&ab_cc=1", "", $url); $url = str_replace("?ab_debug=21cf8d500ee4c0f338777a04235b5096", "", $url); $url = str_replace("&ab_debug=21cf8d500ee4c0f338777a04235b5096", "", $url); $url = str_replace("&phpinfo=1", "", $url); return $url; } //Get page function abGetPageUrl($debug=false) { $query = ""; $protocol = (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) != "off") ? "https://" : "http://"; $host = $_SERVER['HTTP_HOST']; if ($_SERVER["REDIRECT_URL"]) { //Redirect if (isset($_SERVER['REDIRECT_SCRIPT_URI'])) { //Use URI - it is complete $page = $_SERVER['REDIRECT_SCRIPT_URI']; } else { //Use file and query $file = $_SERVER["REDIRECT_URL"]; if (isset($_SERVER['REDIRECT_QUERY_STRING'])) { $query = "?".$_SERVER['REDIRECT_QUERY_STRING']; } } } else { //No redirect if (isset($_SERVER['REQUEST_URI'])) { //Use URI if (substr($_SERVER['REQUEST_URI'],0,4) == "http") { //Request URI has host in it $page = $_SERVER['REQUEST_URI']; } else { //Request uri lacks host $page = $protocol.$host.$_SERVER['REQUEST_URI']; } } else if (isset($_SERVER['SCRIPT_URI'])) { //Use URI - it is complete $page = $_SERVER['SCRIPT_URI']; } else { $file = $_SERVER['SCRIPT_NAME']; if (isset($_SERVER['QUERY_STRING'])) { $query = "?".$_SERVER['QUERY_STRING']; } } } if (!$page) { $page = $protocol.$host.$file.$query; } $page = abTrimAbVars($page); echo ($debug) ? "
  • This page is reported as: ".$page : ""; return $page; } //Show phpinfo if debug is on and phpinfo is requested if ($debug && $_GET['phpinfo']) { ?>