Wapbuddy Not Showing Next Page

Started on the old forum in September 2008 · view the original in the archive · old links redirect here

9 replies · 753 views · started 18 years ago · 1 min read

3 participants
Guest #1

Wapbuddy is not working properly on my server :sad:

wn i m clicking on next page its not showing me the next page its showing the same page every time.

here u can ck Click Here

but this same script working fine on freehostia.com

can any 1 suggest me what i hv to do ? plz i need ur help 🙁

here iz the code i m using

<?
header("Content-type: text/vnd.wap.wml"); 
echo "<?xml version=\"1.0\"?>"; 
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\""." \"http://www.wapforum.org/DTD/wml_1.1.xml\">"; 

include("../wapbuddy_settings.php");
if (!isset($page)) {$page = 0;}
$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);
?> 
<wml> 
<card id="card1" title="<? echo $conf["site_name"] ?>"> 
    
<p align="center">[size="1"] 

<?
  /* editable area */
  if(!$partnerid) $partnerid = 11986;    // put your partnerID here
  $alternate_link = '';   // use this to set a default link if no ad returned
  /* end editable area */
    
  //used for ad targeting
  $ua = urlencode($_SERVER['HTTP_USER_AGENT']);
  $ip = urlencode($_SERVER['REMOTE_ADDR']);

  $url = '[url]http://ads.buzzcity.com/show.php?get=1&partnerid='[/url] . 
        $partnerid . '&a=' . $ua . '&i='.$ip;

  @$ad_serve = fopen($url,'r');
  $contents = '';
  if ($ad_serve) {
      while (!feof($ad_serve))
          $contents .= fread($ad_serve,1024);
      fclose($ad_serve);
  }
  $link = explode("\n",$contents);

  $text = $link[0];
  $cid = $link[1];

  if ( isset($link) && !empty($link) ) {
      //display BuzzCity Ad
      echo '<a href="http://click.buzzcity.com/click.php?partnerid=' . 
            $partnerid . '&cid=' . $cid . '">' . $text . '</a>';
  }
  else {
      //no BuzzCity ad, display alternate
      echo $alternate_link;
  }
?>

 
 
 <?php

// change to "live" to disable demo mode and show real ads
define("MOJIVA_MODE", "live");

function mojiva_ad($mojiva_params = array())
{
    // prepare url parameters of request
    $mojiva_get  = 'site='.urlencode('95');
    $mojiva_get .= '&ip='.urlencode($_SERVER['REMOTE_ADDR']);
    $mojiva_get .= '&ua='.urlencode($_SERVER['HTTP_USER_AGENT']);
    $mojiva_get .= '&url='.urlencode(sprintf("http%s://%s%s", (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == TRUE ? "s": ""), $_SERVER["HTTP_HOST"], $_SERVER["REQUEST_URI"]));
    $mojiva_get .= '&zone='.urlencode('95');
    $mojiva_get .= '&adstype=3'; // type of ads (1 - text only, 2 - images only, 3 - text + images)
    $mojiva_get .= '&key=1';
    $mojiva_get .= '&count=1'; // quantity of ads
    $mojiva_get .= '&keywords='; // keywords to search ad delimited by commas (not necessary)
    $mojiva_get .= '&whitelabel=0'; // filter by whitelabel(0 - all, 1 - only whitelabel, 2 - only non-whitelabel
    $mojiva_get .= '&premium=0'; // filter by premium status (0 - non-premium, 1 - premium only, 2 - both
    $mojiva_get .= '&paramBORDER='.urlencode('#000000'); // ads border color
    $mojiva_get .= '&paramHEADER='.urlencode('#cccccc'); // header color
    $mojiva_get .= '&paramBG='.urlencode('#eeeeee'); // background color
    $mojiva_get .= '&paramTEXT='.urlencode('#000000'); // text color
    $mojiva_get .= '&paramLINK='.urlencode('#ff0000'); // url color
    if(MOJIVA_MODE == "test") $mojiva_get .= '&test=1';

    // send request
    $mojiva_request = @fsockopen('ads.mojiva.com', 80, $errno, $errstr, 1);
    if ($mojiva_request) {
        stream_set_timeout($mojiva_request, 1000);
        fwrite($mojiva_request, "GET /ad?".$mojiva_get." HTTP/1.0\r\n");
        fwrite($mojiva_request, "Host: ads.mojiva.com\r\n");
        fwrite($mojiva_request, "Connection: Close\r\n\r\n");
        $mojiva_info = stream_get_meta_data($mojiva_request);
        $mojiva_timeout = $mojiva_info['timed_out'];
        $mojiva_contents = "";
        $mojiva_body = false;
        $mojiva_head = "";
        while (!feof($mojiva_request) && !$mojiva_timeout) {
            $mojiva_line = fgets($mojiva_request);
            if(!$mojiva_body && $mojiva_line == "\r\n") $mojiva_body = true;
            if(!$mojiva_body) $mojiva_head .= $mojiva_line;
            if($mojiva_body && !empty($mojiva_line)) $mojiva_contents .= $mojiva_line;
            $mojiva_info = stream_get_meta_data($mojiva_request);
            $mojiva_timeout = $mojiva_info['timed_out'];
        }
        fclose($mojiva_request);
        if (!preg_match('/^HTTP\/1\.\d 200 OK/', $mojiva_head)) $mojiva_timeout = true;
        if($mojiva_timeout) return "";
        return $mojiva_contents;
    }
}

?>
<?php

// copy this snippet elsewhere on your page for display more of ads
echo mojiva_ad($mojiva_params);

?>

  <small>- - - - [/size] 
  

  <?
        
        if ($file_count > 0)
            {
            $first_record = $page * $conf["items_per_page"];
            $last_record = $first_record + $conf["items_per_page"];
            
            while (list($fileIndexValue, $file_name) = each ($file_array))
                {
                
                if (($fileIndexValue >= $first_record) AND ($fileIndexValue < $last_record))
                    {
                    echo "<img src=\"$file_name\" alt=\"Wait...\"/>
";
                    echo "<a href=\"../$file_name\">Download It!</a>
";
                    $total = $total + filesize($file_name);
                    }
                    
                }
            
            echo "<img src=\"http://bdmobi.com/ads/line.gif\" alt=\"*\"/>
";

include("http://bdmobi.com/ads/ad2.php");
echo "
";

echo "<img src=\"http://bdmobi.com/ads/line.gif\" alt=\"*\"/>
";
                

if (($file_count > 0) AND ($page != 0))
                {
            
                // previous button
                $prev_page = $page -1;
                echo "<a href=\"".$_SERVER["PHP_SELF"]."?page=$prev_page\">« Prev Page</a>";
                }
            
            echo "|";
            if (($file_count > 0) AND ($last_record < $file_count))
                {
                // next button
                $next_page = $page + 1;
                echo "[b] <a href=\"".$_SERVER["PHP_SELF"]."?page=$next_page\">» Next Page »</a>[/b]
";
                }

            
                {echo "Click Next Page for more";}
                
            
            
            
            }
        closedir($dp);
        ?>
  

 <a href="http://click.buzzcity.com/click.php?partnerid=11068">
   [img]http://ads.buzzcity.com/show.php?partnerid=11068[/img]
</a>
 

    
    
    
    <?
  /* editable area */
  if(!$partnerid) $partnerid = 11986;    // put your partnerID here
  $alternate_link = '[url]http://wapnext.com';  [/url] // use this to set a default link if no ad returned
  /* end editable area */
    
  //used for ad targeting
  $ua = urlencode($_SERVER['HTTP_USER_AGENT']);
  $ip = urlencode($_SERVER['REMOTE_ADDR']);

  $url = '[url]http://ads.buzzcity.com/show.php?get=1&partnerid='[/url] . 
        $partnerid . '&a=' . $ua . '&i='.$ip;

  @$ad_serve = fopen($url,'r');
  $contents = '';
  if ($ad_serve) {
      while (!feof($ad_serve))
          $contents .= fread($ad_serve,1024);
      fclose($ad_serve);
  }
  $link = explode("\n",$contents);

  $text = $link[0];
  $cid = $link[1];

  if ( isset($link) && !empty($link) ) {
      //display BuzzCity Ad
      echo '<a href="http://click.buzzcity.com/click.php?partnerid=' . 
            $partnerid . '&cid=' . $cid . '">' . $text . '</a>';
  }
  else {
      //no BuzzCity ad, display alternate
      echo $alternate_link;
  }
?>

 
 
 <?php

// copy this snippet elsewhere on your page for display more of ads
echo mojiva_ad($mojiva_params);

?>
[b][url="http://bdmobi.com"]Home > bdmobi.com[/url][/b]
 

[img]http://c.wen.ru/423006.wbmp?wallpaper[/img]

        
        

</small></p>
</card> 
</wml>
something else Fellow · 2,296 posts #2

your writing is nt showing either lol i suspect your keyboard and mouse are not working correctly lol

more info...........?

subzero Super moderator Fellow · 3,954 posts #4

lol try the search button

also can try ya php_vale reg 1

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 #5

.htaccess

php_value register_globals 1

if you get a 500 error place this

php_value register_globals 0

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... _______…

Guest #6

lol try the search button

also can try ya php_vale reg 1

Actually i didn't understand what i hv to do 🙁 i m not a pro PHP programmer

subzero Super moderator Fellow · 3,954 posts #7

edit or make file name

.htaccess

php_value register_globals 1

or

php_value register_globals 0

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... _______…

something else Fellow · 2,296 posts #8

or another way is to add:

$page = $_GET["page"];

at top of page.

registering globals is cr@p Everyone here pretty much will insist you turn globals on but......... It may resolve problems short term. but can create even bigger problems Ever wondered why globals are not turned on as standard? and are also going to be removed from php6?

Guest #9

nop , not working

edit or make file name

.htaccess

php_value register_globals 1

or

php_value register_globals 0
subzero Super moderator Fellow · 3,954 posts #10

place

php_value register_globals 0

only one in there and try to trun off if its 0 try on by php_value register_globals 1

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... _______…

Write your reply now; next you create a free account (or sign in) and it is posted right away. 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