exclude from auto index

Started on the old forum in October 2009 · view the original in the archive · old links redirect here

12 replies · 644 views · started 17 years ago · 1 min read

5 participants
cobusbo Developer · 117 posts #1

Hi can someone give me a code to exclude files in a auto index I need to exclude admob.php and admob2.php to be excluded from showing?

subzero Super moderator Fellow · 3,954 posts #2

include("admob.php");

lol

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

subzero Super moderator Fellow · 3,954 posts #4

look for

$file !== "index.php"

then you place

$file !== "index.php" AND $file !== "admob.php"

or

$file !== "index.php" || $file !== "admob.php"

it can be anything like

$strFilename != "." && $strFilename != ".." && $strFilename != "index.php" && $strFilename != "ans" && $strFilename != ".htaccess" && $strFilename != "img.php" && $strFilename != "l.gif")

or

if(substr($file,0,1) != '.' and $file !="disclaimer.php" and $file !="ans" and $file !="ozzydate" and $file != "img.jpg" and $file != "index.php" and $file != "wapchat" and $file != "style.css" and $file != "47" and $file != "hiden" and $file != "logo.jpg" and $file != "img.php" and $file != "KING.vcf" and $file != "l.gif") {

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

cobusbo Developer · 117 posts #5

I place the code to add it onto the autoindex like this pic 1

Then I add the admob configuration script admob.php the full script and admob2.php the echo one to add more then 1 ad on a page in the same directory as the auto index pic 2

Then it shows on the web url the admob.php and admob2.php and I dont want it pic 3

cobusbo Developer · 117 posts #7

subzero wrote: include("admob.php");

lol

this is the correct one but all i need is to get it edited to get admob.php from my main folder every time i use this code. because atm if I make a new folder I need to place admob.php in that folder also then it appears in my auto index I want it to get edited to something like this:

<?php include("http://all43.co.cc/admob.php") ?>

but that code is wrong I know I need it fixed please

I don't need the code to run more then one ad I got it. It is

<?php echo admob_request($admob_params); ?>

😕

strikingv Developer · 70 posts #8

upload admob.php in the root n include it as include '/admob.php' .

cobusbo Developer · 117 posts #9

yes but my auto index arent in the root folder its in uploads/Albums/

If I add '/admob.php' it will search for the file admob in directery uploads/Albums/

ranzit2 Developer · 187 posts #10

cobusbo wrote: yes but my auto index arent in the root folder its in uploads/Albums/

If I add '/admob.php' it will search for the file admob in directery uploads/Albums/

upload the index file here in which u want to exclude.or if everything doesnot work then why not paste the admob function in index instead of including it.

she is beautifull than php.and i love her more than php.

cobusbo Developer · 117 posts #11

Here is my autoindex script

<?
/*
----------------------------------------------------------
POCKETWAP.NET AUTO INDEX PHP SCRIPT
Version: 2.0 ( html)
Last update: 02 July 2009
----------------------------------------------------------
Author : SANJAYCITY
Website: http://pocketwap.net
Sript Forum : http://scripts.pocketwap.net
Email: admin@pocketwap.net
Copyright (c) 2009 SANJAYCITY. All rights reserved.
-----------------------------------------------------------
Get More Free PHP scripts at http://scripts.pocketwap.net
----------------------------------------------------------
*/

?>

<title>Free full mp3 albums</title>

<meta name="description" content=" Free Mobile Wallpapers, Ringtones, Amr ringtones, Mp3 ringtones, MMf ringtones, free wallpaper,themes, free videos, download, movie, mp3 songs, 3gp mp4 avi videos, mobile software, games, free mp3 songs, tamil, telugu, malayalam,
 kannada, pakistani, punjabi, bengali, english, hindi, bhangra, pashto, ghazals, quawwalia, bollywood, tollywood, hollywood, kollywood,
  mulluwood, mp3,Tamil MP3,Tamil Compressed Mp3,Tamil Full MP3,Mp3,128 Bit Mp3,Hindi MP3,Tamil Wav Tones,Tamil New Mp3,2009 Hits Mp3,
  Tamil 3gp,Tamil Mp4,Tamil Ring tone,Tamil Midi Tones,Tamil Amr Tones,Mobile Software,Application,sis,sisx,jar,jad,thm,Wallpaper,Screen
   Savers,Java Games,Java Application">

<meta name="keywords" content=" free SMS, SMS, free ringtone, Amr ringtones,
 Mp3 ringtones, MMf ringtones, free wallpaper, themes, free videos, download, movie, mp3 songs, 3gp mp4 avi videos, mobile software, games, free mp3 songs, tamil, telugu, malayalam, kannada, pakistani, punjabi, bengali,
english, hindi, bhangra, pashto, ghazals, quawwalia, bollywood, tollywood, hollywood, kollywood, mulluwood, mp3,Tamil MP3,Tamil Compressed Mp3,
Tamil Full MP3,Mp3,128 Bit Mp3,Hindi MP3,Tamil Wav Tones,Tamil New Mp3,2009 Hits Mp3,Tamil 3gp,Tamil Mp4,Tamil Ring tone,Tamil Midi Tones,Tamil
 Amr Tones,Mobile Software,Application,sis,sisx,jar,jad,thm,Wallpaper,Screen Savers,Java Games,Java Application, Mobile Secret Codes, Mobile Codes,
 Codes, Mobile, Nokia, Nokia Codes, Nokia Secret Codes,Sony Ericsson, Sony Ericsson Codes, Sony Ericsson Secret Codes, Motorola, Motorola Codes, 
 Motorola Secret Codes, Samsung,Samsung Codes, Samsung Secret Codes, LG ,LG Codes,LG Secret Codes, BenQ-Siemens,BenQ-Siemens Codes, BenQ-Siemens 
 Secret Codes, Sagem, Sagem Codes,Sagem Secret Codes,sharp, Sharp Codes, Sharp Secret Codes," />

<link href="http://freedownloadmaniac.net78.net/bitking.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
body {
	background-color: #CCFFFF;
}
a:link {
	color: #999999;
}
a:visited {
	color: #999999;
}
body,td,th {
	color: #33FFFF;
}
.style8 {
	color: #999999
}
-->
</style><left>
<div class="bitking">
  <div align="center"><img src="http://bitking.co.cc/king.png" alt="king" width="71" height="53" align="center" /></b>
  </div>
<div align="center"><img src="http://all43.co.cc/images/all43.JPG" alt="all43" width="102" height="53" align="center" /></b>
  </div>

  <p align="center"><b>
    ...:::BITKING & ALL43 DOWNLOADS:::...</b><br />
<?php
include "admob.php";
?>

</p>

    <?
$items_per_page = "10";
$size_bytes = 100072000;
$kb = $size_bytes / 1024;
$mb = $size_bytes / 1024000;
if (!isset($_GET['page']))
{ $page=0; }
else  { $page = $_GET['page']; }
$total = 0;

	if(!($dp = opendir("./"))) die ("Cannot open ./");
$file_array = array();
while ($file = readdir ($dp))
	{
	if(substr($file,0,1) != '.' and $file != "index.php")
		{
		$file_array[] =  $file;
		}
	}
$file_count = count ($file_array);
sort ($file_array);

				if ($file_count > 0)
			{
			$first_record = $page * $items_per_page;
			$last_record = $first_record + $items_per_page;

			while (list($fileIndexValue, $file_name) = each ($file_array))
				{

				if (($fileIndexValue >= $first_record) AND ($fileIndexValue < $last_record))
					{

					echo "<img src=\"http://bitking.co.cc/dir.png\"><a href=\"$file_name\">$file_name</a><br />";
					$total = $total + filesize($file_name);
					
					}
				}
			?>
    </p>
<hr><left><?
			
			if (($file_count > 0) AND ($page != 0))
				{

				
				// previous button
				
				$prev_page = $page -1;
				
				echo "<a  href=\"".$_SERVER["PHP_SELF"]."?page=$prev_page\">[Back]</a> | ";
				               
				}

			if (($file_count > 0) AND ($last_record < $file_count))
				{
				// next button
				$next_page = $page + 1;
				echo "<a href=\"".$_SERVER["PHP_SELF"]."?page=$next_page\">[Next]</a>";
				}
				
				
				echo "<br/>Directory:<br/>$file_count ";
			if ($file_count == 1)
				{echo "file";}
			else
				{echo "files";}
				
			echo " (" . round($total/1024,1) . "kb)";
			
				// Home index
				echo " <br/><a  href=\"http://bitking.co.cc\">[BITKING]</a>";
                        echo " <br/><a  href=\"http://all43.co.cc\">[ALL43]</a>";
				
/*
-----------------------------------------------------------
Please Support Us by providing back Link to Our Site,
Don't delete this partner link.
----------------------------------------------------------
*/
				
							}
			
		closedir($dp);
		
		?>
        
        <br />
<?php
include("/admob2.php")
?>
<br />
		All Rights Reserved.
		<hr/>
</div>
        </center>
        

my admob.php and admob2.php is located http://freedownloadmaniac.net78.net/admob.php and http://freedownloadmaniac.net78.net/admob2.php

admob.php looks like this

<?php
// AdMob Publisher Code
// Language: PHP (curl)
// Version: 20081105
// Copyright AdMob, Inc., All rights reserved
// Documentation at http://developer.admob.com/wiki/Main_Page

$admob_params = array(
  'PUBLISHER_ID'      => 'a14a8b235f3d8e5', // Required to request ads. To find your Publisher ID, log in to your AdMob account and click on the "Sites & Apps" tab.
  'ANALYTICS_ID'      => 'your_analytics_site_id', // Required to collect Analytics data. To find your Analytics ID, log in to your Analytics account and click on the "Edit" link next to the name of your site.
  'AD_REQUEST'        => true, // To request an ad, set to TRUE.
  'ANALYTICS_REQUEST' => false, // To enable the collection of analytics data, set to TRUE.
  'TEST_MODE'         => false, // While testing, set to TRUE. When you are ready to make live requests, set to FALSE.
  // Additional optional parameters are available at: http://developer.admob.com/wiki/AdCodeDocumentation
  'OPTIONAL'          => array()
);

// Optional parameters for AdMob Analytics (http://analytics.admob.com)
//$admob_params['OPTIONAL']['title'] = "Enter Page Title Here"; // Analytics allows you to track site usage based on custom page titles. Enter custom title in this parameter.
//$admob_params['OPTIONAL']['event'] = "Enter Event Name Here"; // To learn more about events, log in to your Analytics account and visit this page: http://analytics.admob.com/reports/events/add

/* This code supports the ability for your website to set a cookie on behalf of AdMob
 * To set an AdMob cookie, simply call admob_setcookie() on any page that you call admob_request()
 * The call to admob_setcookie() must occur before any output has been written to the page (http://www.php.net/setcookie)
 * If your mobile site uses multiple subdomains (e.g. "a.example.com" and "b.example.com"), then pass the root domain of your mobile site (e.g. "example.com") as a parameter to admob_setcookie().
 * This will allow the AdMob cookie to be visible across subdomains
 */
//admob_setcookie();

/* AdMob strongly recommends using cookies as it allows us to better uniquely identify users on your website.
 * This benefits your mobile site by providing:
 *    - Improved ad targeting = higher click through rates = more revenue!
 *    - More accurate analytics data (http://analytics.admob.com)
 */
 
// Send request to AdMob. To make additional ad requests per page, copy and paste this function call elsewhere on your page.
echo admob_request($admob_params);

/////////////////////////////////
// Do not edit below this line //
/////////////////////////////////

// This section defines AdMob functions and should be used AS IS.
// We recommend placing the following code in a separate file that is included where needed.

function admob_request($admob_params) {
  static $pixel_sent = false;

  $ad_mode = false;
  if (!empty($admob_params['AD_REQUEST']) && !empty($admob_params['PUBLISHER_ID'])) $ad_mode = true;
  
  $analytics_mode = false;
  if (!empty($admob_params['ANALYTICS_REQUEST']) && !empty($admob_params['ANALYTICS_ID']) && !$pixel_sent) $analytics_mode = true;
  
  $protocol = 'http';
  if (!empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) != 'off') $protocol = 'https';
  
  $rt = $ad_mode ? ($analytics_mode ? 2 : 0) : ($analytics_mode ? 1 : -1);
  if ($rt == -1) return '';
  
  list($usec, $sec) = explode(' ', microtime()); 
  $params = array('rt=' . $rt,
                  'z=' . ($sec + $usec),
                  'u=' . urlencode($_SERVER['HTTP_USER_AGENT']), 
                  'i=' . urlencode($_SERVER['REMOTE_ADDR']), 
                  'p=' . urlencode("$protocol://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']),
                  'v=' . urlencode('20081105-PHPCURL-acda0040bcdea222')); 

  $sid = empty($admob_params['SID']) ? session_id() : $admob_params['SID'];
  if (!empty($sid)) $params[] = 't=' . md5($sid);
  if ($ad_mode) $params[] = 's=' . $admob_params['PUBLISHER_ID'];
  if ($analytics_mode) $params[] = 'a=' . $admob_params['ANALYTICS_ID'];
  if (!empty($_COOKIE['admobuu'])) $params[] = 'o=' . $_COOKIE['admobuu'];
  if (!empty($admob_params['TEST_MODE'])) $params[] = 'm=test';

  if (!empty($admob_params['OPTIONAL'])) {
    foreach ($admob_params['OPTIONAL'] as $k => $v) {
      $params[] = urlencode($k) . '=' . urlencode($v);
    }
  }

  $ignore = array('HTTP_PRAGMA' => true, 'HTTP_CACHE_CONTROL' => true, 'HTTP_CONNECTION' => true, 'HTTP_USER_AGENT' => true, 'HTTP_COOKIE' => true);
  foreach ($_SERVER as $k => $v) {
    if (substr($k, 0, 4) == 'HTTP' && empty($ignore[$k]) && isset($v)) {
      $params[] = urlencode('h[' . $k . ']') . '=' . urlencode($v);
    }
  }
  
  $post = implode('&', $params);
  $request = curl_init();
  $request_timeout = 1; // 1 second timeout
  curl_setopt($request, CURLOPT_URL, 'http://r.admob.com/ad_source.php');
  curl_setopt($request, CURLOPT_RETURNTRANSFER, 1);
  curl_setopt($request, CURLOPT_TIMEOUT, $request_timeout);
  curl_setopt($request, CURLOPT_CONNECTTIMEOUT, $request_timeout);
  curl_setopt($request, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded', 'Connection: Close'));
  curl_setopt($request, CURLOPT_POSTFIELDS, $post);
  list($usec_start, $sec_start) = explode(' ', microtime());
  $contents = curl_exec($request);
  list($usec_end, $sec_end) = explode(' ', microtime());
  curl_close($request);

  if ($contents === true || $contents === false) $contents = '';

  if (!$pixel_sent) {
    $pixel_sent = true;
    $contents .= "<img src=\"$protocol://p.admob.com/e0?"
              . 'rt=' . $rt
              . '&z=' . ($sec + $usec)
              . '&a=' . ($analytics_mode ? $admob_params['ANALYTICS_ID'] : '')
              . '&s=' . ($ad_mode ? $admob_params['PUBLISHER_ID'] : '')
              . '&o=' . (empty($_COOKIE['admobuu']) ? '' : $_COOKIE['admobuu'])
              . '&lt=' . ($sec_end + $usec_end - $sec_start - $usec_start)
              . '&to=' . $request_timeout
              . '" alt="" width="1" height="1"/>';
  }
  
  return $contents;
}

function admob_setcookie($domain = '', $path = '/') {
  if (empty($_COOKIE['admobuu'])) {    
    $value = md5(uniqid(rand(), true));
    if (!empty($domain) && $domain[0] != '.') $domain = ".$domain";
    if (setcookie('admobuu', $value, mktime(0, 0, 0, 1, 1, 2038), $path, $domain)) {
      $_COOKIE['admobuu'] = $value; // make it visible to admob_request()
    } 
  }
}
?>

and admob2.php looks like this

<?php
echo admob_request($admob_params);
?>

can you edit it please...

ranzit2 Developer · 187 posts #12
<?
/*
----------------------------------------------------------
POCKETWAP.NET AUTO INDEX PHP SCRIPT
Version: 2.0 ( html)
Last update: 02 July 2009
----------------------------------------------------------
Author : SANJAYCITY
Website: http://pocketwap.net
Sript Forum : http://scripts.pocketwap.net
Email: admin@pocketwap.net
Copyright (c) 2009 SANJAYCITY. All rights reserved.
-----------------------------------------------------------
Get More Free PHP scripts at http://scripts.pocketwap.net
----------------------------------------------------------
*/

?>

<title>Free full mp3 albums</title>

<meta name="description" content=" Free Mobile Wallpapers, Ringtones, Amr ringtones, Mp3 ringtones, MMf ringtones, free wallpaper,themes, free videos, download, movie, mp3 songs, 3gp mp4 avi videos, mobile software, games, free mp3 songs, tamil, telugu, malayalam,
 kannada, pakistani, punjabi, bengali, english, hindi, bhangra, pashto, ghazals, quawwalia, bollywood, tollywood, hollywood, kollywood,
  mulluwood, mp3,Tamil MP3,Tamil Compressed Mp3,Tamil Full MP3,Mp3,128 Bit Mp3,Hindi MP3,Tamil Wav Tones,Tamil New Mp3,2009 Hits Mp3,
  Tamil 3gp,Tamil Mp4,Tamil Ring tone,Tamil Midi Tones,Tamil Amr Tones,Mobile Software,Application,sis,sisx,jar,jad,thm,Wallpaper,Screen
   Savers,Java Games,Java Application">

<meta name="keywords" content=" free SMS, SMS, free ringtone, Amr ringtones,
 Mp3 ringtones, MMf ringtones, free wallpaper, themes, free videos, download, movie, mp3 songs, 3gp mp4 avi videos, mobile software, games, free mp3 songs, tamil, telugu, malayalam, kannada, pakistani, punjabi, bengali,
english, hindi, bhangra, pashto, ghazals, quawwalia, bollywood, tollywood, hollywood, kollywood, mulluwood, mp3,Tamil MP3,Tamil Compressed Mp3,
Tamil Full MP3,Mp3,128 Bit Mp3,Hindi MP3,Tamil Wav Tones,Tamil New Mp3,2009 Hits Mp3,Tamil 3gp,Tamil Mp4,Tamil Ring tone,Tamil Midi Tones,Tamil
 Amr Tones,Mobile Software,Application,sis,sisx,jar,jad,thm,Wallpaper,Screen Savers,Java Games,Java Application, Mobile Secret Codes, Mobile Codes,
 Codes, Mobile, Nokia, Nokia Codes, Nokia Secret Codes,Sony Ericsson, Sony Ericsson Codes, Sony Ericsson Secret Codes, Motorola, Motorola Codes, 
 Motorola Secret Codes, Samsung,Samsung Codes, Samsung Secret Codes, LG ,LG Codes,LG Secret Codes, BenQ-Siemens,BenQ-Siemens Codes, BenQ-Siemens 
 Secret Codes, Sagem, Sagem Codes,Sagem Secret Codes,sharp, Sharp Codes, Sharp Secret Codes," />

<link href="http://freedownloadmaniac.net78.net/bitking.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
body {
	background-color: #CCFFFF;
}
a:link {
	color: #999999;
}
a:visited {
	color: #999999;
}
body,td,th {
	color: #33FFFF;
}
.style8 {
	color: #999999
}
-->
</style><left>
<div class="bitking">
  <div align="center"><img src="http://bitking.co.cc/king.png" alt="king" width="71" height="53" align="center" /></b>
  </div>
<div align="center"><img src="http://all43.co.cc/images/all43.JPG" alt="all43" width="102" height="53" align="center" /></b>
  </div>

  <p align="center"><b>
    ...:::BITKING & ALL43 DOWNLOADS:::...</b><br />
<?php
include "admob.php";
?>

</p>

    <?
$items_per_page = "10";
$size_bytes = 100072000;
$kb = $size_bytes / 1024;
$mb = $size_bytes / 1024000;
if (!isset($_GET['page']))
{ $page=0; }
else  { $page = $_GET['page']; }
$total = 0;

	if(!($dp = opendir("./"))) die ("Cannot open ./");
$file_array = array();
while ($file = readdir ($dp))
	{
	if(substr($file,0,1) != '.' and $file != "admob2.php" and $file != "admob.php" and $file != "index.php")
		{
		$file_array[] =  $file;
		}
	}
$file_count = count ($file_array);
sort ($file_array);

				if ($file_count > 0)
			{
			$first_record = $page * $items_per_page;
			$last_record = $first_record + $items_per_page;

			while (list($fileIndexValue, $file_name) = each ($file_array))
				{

				if (($fileIndexValue >= $first_record) AND ($fileIndexValue < $last_record))
					{

					echo "<img src=\"http://bitking.co.cc/dir.png\"><a href=\"$file_name\">$file_name</a><br />";
					$total = $total + filesize($file_name);
					
					}
				}
			?>
    </p>
<hr><left><?
			
			if (($file_count > 0) AND ($page != 0))
				{

				
				// previous button
				
				$prev_page = $page -1;
				
				echo "<a  href=\"".$_SERVER["PHP_SELF"]."?page=$prev_page\">[Back]</a> | ";
				               
				}

			if (($file_count > 0) AND ($last_record < $file_count))
				{
				// next button
				$next_page = $page + 1;
				echo "<a href=\"".$_SERVER["PHP_SELF"]."?page=$next_page\">[Next]</a>";
				}
				
				
				echo "<br/>Directory:<br/>$file_count ";
			if ($file_count == 1)
				{echo "file";}
			else
				{echo "files";}
				
			echo " (" . round($total/1024,1) . "kb)";
			
				// Home index
				echo " <br/><a  href=\"http://bitking.co.cc\">[BITKING]</a>";
                        echo " <br/><a  href=\"http://all43.co.cc\">[ALL43]</a>";
				
/*
-----------------------------------------------------------
Please Support Us by providing back Link to Our Site,
Don't delete this partner link.
----------------------------------------------------------
*/
				
							}
			
		closedir($dp);
		
		?>
        
        <br />
<?php
include("admob2.php")
?>
<br />
		All Rights Reserved.
		<hr/>
</div>
        </center>

subzero clearly explained but you did not followed him.anyway use it ..

she is beautifull than php.and i love her more than php.

cobusbo Developer · 117 posts #13

Thankyou got a solution from coding central but this one also works thanks

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close