Error 404 file not found
Here is a new script/idea i have for redirection. I have been using it for some of my sites. I used and updated a short line of code i found in the index.php of one of the old cult scripts
---
Multi Direct - by devianceX
---
This is a multi redirection script that will detect if a browser can accept html, wml, or both.
The theory behind this is simple: if the browser accepts only html it is more than likely to be a web browser, if the browser accepts only wml it must be a wap 1.0 device, if it accepts html and wml it is more than likely a wap 2.0 device/pda/symbian/smartphone, and if its none of the above.. Mmm maybe its a bot script or a hacking attempt?
---
Install
---
This script is super simple to install, simply change the variables in index.php and upload to your portal site.
If you are already using index.php you could rename the file and just use the PHP INCLUDE command to include it in your index.php or simply copy the code to your existing index.php above the header
---
To Do
---
Still need to work out how to determine a symbian device from a wap 2.0 device that don't support symbian apps, if you know how to do this please mail [Only registered and activated users can see links. Click Here To Register...] or visit me at [Only registered and activated users can see links. Click Here To Register...] and send a private message to devianceX
---
© 2001-2006 devianceX
---
DOWNLOAD MULTI DIRECT BY DEViANCE HERE:
[Only registered and activated users can see links. Click Here To Register...]
Error 404 file not found
Advertise your mobile site for FREE with [Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]
Mom strange.. To be honest i never tried it, the file is on my site at that location. Maybe my download script protects from hotlinking. I would upload but the cookie settings on this board stop me from staying logged in with opera mobile on my 6630. If someone can grab it from my site an upload it that would be helpfull.
COPYING.txt
[code]
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright © 1989, 1991 Free Software Foundation, Inc.
675 Mass Ave, Cambridge, MA 02139, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any
index.php
Mmm.. I was posting a topic.. Do you have to stick you nose in?Code:<?php /** * * @package Multi Direct * @version 1.00 BETA 2006/12/02 12:30:00 devianceX * @copyright (c) 2001-2006 devianceX * @license [Only registered and activated users can see links. Click Here To Register...] GNU Public License * */ /** */ //EDIT BELOW //your web url $WEB_URL = '[Only registered and activated users can see links. Click Here To Register...] //your wap 1.0 url $WAP_URL = '[Only registered and activated users can see links. Click Here To Register...] //url for wap 2.0 and similar html and wml compatible browsers $BOTH_URL = '[Only registered and activated users can see links. Click Here To Register...] //a url to redirect strange or unrecognized browsers, its very unlikely this will be needed $MMM_URL = '[Only registered and activated users can see links. Click Here To Register...] //DO NOT EDIT BELOW THIS LINE UNLESS YOUR EXPERIENCED IN PHP //if browser does NOT accept wml then html variable is true if ((eregi ("text/vnd.wap.wml", $HTTP_ACCEPT)) != true) { $HTML = 'TRUE'; } //lets see if wml is true also or if its a pure web browser if ((eregi ("text/html", $HTTP_ACCEPT)) != true) { $WML = 'TRUE'; } //if wml AND html are true it must be wap 2.0 phone and we should direct to html lo-fi (or give a choice) if ($HTML='TRUE' AND $WML='TRUE' AND $S60='FALSE') { //both wml and html set true $BOTH = 'TRUE'; } //if wml and html true if ($BOTH='TRUE') { //redirect to both url //exit header("Location: $BOTH_URL"); exit; }else { //if wml is true if ($WML='TRUE') { //redirect to wap url //exit header("Location: $WAP_URL"); exit; }else { //if web is true if ($WEB='TRUE') { //redirect to web url //exit header("Location: $WEB_URL"); exit; }else { //if for some strange reason its not any of the above let it carry on to the web site.. Or is it a bot? Pmpl //redirect to mmm //exit header("Location: $MMM_URL"); exit; }}} // END OF REDIRECTION - SCRIPT BY DEVIANCEX // [Only registered and activated users can see links. Click Here To Register...] - THE BEST WAPFORUM //////////////////////////////// //(c) 2001-2006 devianceX //////////////////////////////// ?>
Why do you put a gnu license to such a simple code?Mom strange.. To be honest i never tried it, the file is on my site at that location. Maybe my download script protects from hotlinking. I would upload but the cookie settings on this board stop me from staying logged in with opera mobile on my 6630. If someone can grab it from my site an upload it that would be helpfull.
COPYING.txt
[code]
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991[/b]
Advertise your mobile site for FREE with [Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]
cause hes a noob GumSlone, you should know that by now![]()
8th wonder of the world
Mmm ok dj (coming from someone that can't write anything and just uses scripts he stole from blaze, me, and others).
@Gumslone: because i put it to some script sites and they were asking for license details, also i plan to add more functions to it. Also it makes it look more professional.
*giggles* n00b = newbiecause hes a noob GumSlone, you should know that by now[/b]
dj.dance = mcommunity owner who begged to be admin on a mobiilchat site and devoted months to bugging me. Who is the n00b? Pmpl QUOTE=dj.dance "If you don't link to my mcommunity site and make me admin i will bug you forever" ha ha.. Now stop being silly an grow up. I been around wap alot longer than you and many people here.
eh wtf? that was ages ago??? also that was in my first 2 months of site building? how da hell can you take that for granted? get a life..
8th wonder of the world
ages ago or not your clearly as childish now as you were then. Think its you little teenage losers that need a life, i got a great life thanks ;-)eh wtf? that was ages ago??? also that was in my first 2 months of site building? how da hell can you take that for granted? get a life..[/b]
Code:<?php //Description //Do not remove the below code. This will lead to violation of Terms Of Use /**************************************************************************** This script is written by Anurag Singh Title: Wap Redirect Version: 1.0 Email: [Only registered and activated users can see links. Click Here To Register...], Homepage: [Only registered and activated users can see links. Click Here To Register...] Special thanks to Harald Hope, Website: [Only registered and activated users can see links. Click Here To Register...] And also to Joseph George Jacobs , Email [Only registered and activated users can see links. Click Here To Register...] ****************************************************************************/ //Configuration global $userBrowser; // Your wapsite //enter the link you want user to be redirected in case of WML browser $wmllink = "http://bcfc.me.uk/index2.php/"; // Your website //enter the link you want user to be redirected in case of PC browser $htmllink = "http://www.wapsilon.com/bcfc.me.uk/index.php"; //There is no need to edit any information from this point on //however in case if you want to contribute please do so //please be sure to let me know about the changes //Detect the browser $userBrowser = $_SERVER['HTTP_USER_AGENT']; //Remove the below // qutoes. //It helps to check if there is any error when editing //If everything is all right it will display the browser information //please remember to put // back after testing or no redirection will occur //echo $userBrowser; //Check for Mozilla if(stristr($userBrowser, 'Mozilla')) { $ub="PC"; } //Check for Mozilla elseif(stristr($userBrowser, 'gecko')) { $ub="PC"; } //Check for opera //Check for omniweb elseif(stristr($userBrowser, 'omniweb')) { $ub="PC"; } //Check for msie elseif(stristr($userBrowser, 'msie')) { $ub="PC"; } //Check for konqueror elseif(stristr($userBrowser, 'konqueror')) { $ub="PC"; } //Check for safari elseif(stristr($userBrowser, 'safari')) { $ub="PC"; } //Check for netpositive elseif(stristr($userBrowser, 'netpositive')) { $ub="PC"; } //Check for lynx elseif(stristr($userBrowser, 'lynx')) { $ub="PC"; } //Check for elinks elseif(stristr($userBrowser, 'elinks')) { $ub="PC"; } //Check for Mozilla elseif(stristr($userBrowser, 'Mozilla')) { $ub="PC"; } //Check for links elseif(stristr($userBrowser, 'links')) { $ub="PC"; } //Check for w3m elseif(stristr($userBrowser, 'w3m')) { $ub="PC"; } //Check for webtv elseif(stristr($userBrowser, 'webtv')) { $ub="PC"; } //Check for amaya elseif(stristr($userBrowser, 'amaya')) { $ub="PC"; } //Check for dillo elseif(stristr($userBrowser, 'dillo')) { $ub="PC"; } //Check for ibrowse elseif(stristr($userBrowser, 'ibrowse')) { $ub="PC"; } //Check for icab elseif(stristr($userBrowser, 'icab')) { $ub="PC"; } //Check for crazy browser elseif(stristr($userBrowser, 'crazy browser')) { $ub="PC"; } //Check for IE elseif(stristr($userBrowser, 'internet explorer')) { $ub="PC"; } //If it's not any of the above browsers //Then it gotta be a WML or very unpopular browser else { $ub="WML"; } //Code for redirecting based upon the results if($ub == "PC") { header("Location: ".$htmllink); exit; } else { header("Location: ".$wmllink); exit; } ?>
Want something coded email me at [Only registered and activated users can see links. Click Here To Register...] for a prices.
[Only registered and activated users can see links. Click Here To Register...]
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks