wappy
Aug 8 2006, 05:47 AM
hi people :-) listen please can someone help me find the error in this wapsite page, its driving me nuts! It works fine on some phones but not on others (giving a file format unknown error) and im having serious problems finding the error but i bet its something stupid/simple. CODE <?php include ("config.php"); include ("core.php"); header("Content-type: text/vnd.wap.wml"); header("Cache-Control: nostore, nocache, mustrevalidate"); print "<?xml version=\"1.0\"?>"; echo "<!DOCTYPE wml PUBLIC \"//WAPFORUM//DTD WML 1.1//EN\"". " \"http://www.wapforum.org/DTD/wml_1.1.xml\">"; ?> <wml> <?php $uid = $_POST["uid"]; $pwd = $_POST["pwd"]; $cpw = $_POST["cpw"]; connectdb(); echo "<card id=\"register\" title=\"$sitename\">"; $ipr = getip(); $uip = explode(".",$ipr); if($uip[0]=="196" && $uip[1]=="207"){ $phone = "bar"; $phone2 = "bar"; $brws = explode(" ",$HTTP_USER_AGENT); $ubr = $brws[0]; if($phone==$ubr||$phone2==$ubr){ echo "<p>"; echo "<img src=\"images/notok.gif\" alt=\"X\"/>IP range is disabled at the moment"; echo "</p>"; echo "</card>"; echo "</wml>"; exit(); } } if(!canreg()){ echo "<p>"; echo "<img src=\"images/notok.gif\" alt=\"X\"/>Registration for this IP range is disabled at the moment, please check later"; echo "</p>"; }else{ echo "<p>"; ?> <small> <img src="images/point.gif" alt="!"/> Allowed characters in userid and password are az, 09, and _. only<br/> <img src="images/point.gif" alt="!"/> No vulgar words are accepted in UserID<br/> <img src="images/point.gif" alt="!"/> UserID and Password must contain at least 4 characters<br/> <img src="images/point.gif" alt="!"/> UserID must begin with a letter<br/> <img src="images/point.gif" alt="!"/> Birthday must be in this format YYYYMMDD<br/><br/></small> <? $tolog = false; if(trim($uid)==""){ echo registerform(1); }else if(trim($pwd)==""){ echo registerform(2); }else if(trim($cpw)==""){ echo registerform(3); }else if(spacesin($uid)||scharin($uid)){ echo registerform(4); }else if(spacesin($pwd)||scharin($pwd)){ echo registerform(5); }else if($pwd!=$cpw){ echo registerform(6); } else if(strlen($uid)<4){ echo registerform(7); } else if(strlen($pwd)<4){ echo registerform(8); }else if(isdigitf($uid)){ echo registerform(11); } else if(checknick($uid)==1){ echo registerform(12); } else if(checknick($uid)==2) { echo registerform(13); } else if(register($uid,$pwd,$usx,$bdy,$ulc)==1){ echo registerform(9); } else if(register($uid,$pwd,$usx,$bdy,$ulc)==2){ echo registerform(10); }else{ echo "Registration completed successfully!<br/>"; $tolog = true; } echo "</p>"; } echo "<p align=\"center\">"; if($tolog) { echo "<a href=\"login.php?loguid=$uid&logpwd=$pwd\"><img src=\"images/home.gif\" alt=\"*\"/>Login</a>"; }else{ echo "<a href=\"index.php\"><img src=\"images/home.gif\" alt=\"*\"/>Home</a>"; } echo "</p></card></wml>"; ?>
also here is a working example of the page, even if it works on your browser/device i can promise you its not working on all devices/phones as i have many phones and have checked http://s60.fileplace.biz/rave/register.php as you can see its the register page so i MUST fix it FAST! Thanks in advance for any help :-)
Reply
rldowling03
Aug 8 2006, 09:03 AM
Not all phones can view any page. Alot of phones you will see to only be able to view pure wml (with .wml) extension and cannot view php files. I cannot see any errors, either I missed one or there are none. Well good luck with it anyway
Reply
wappy
Aug 8 2006, 09:33 AM
no i know about what pages phones can view and that page does have an error as others are using it i just tested another site and they have fixed it and its working on all phones. Its a pain. Someone said they will send the fixed one to me later so if they do i will post it here so you can see where the problem was. Its a massive community script an the copy i had i don't know how or where it came from it was stolen from another wap site that happened to belong to a guy thats hacked me in the past so im thinking i will fix, update, distribute :-)
Reply
Chatz
Aug 8 2006, 11:04 PM
I can't see any errors what so ever.Are you sure Its register.php? It could be anther file that is linked to the script and as an error.
Reply
wappy
Aug 9 2006, 12:43 AM
100% percent sure its this page that has an error. Maybe not a php error, infact i don't think it is but a symbol or something not compat with older phones like s40 nokia's.. I thought you said you fixed this script 100% chatz?if you have send me the register.php , sub0zero has the fixed one i will bug him again later, but after that is fixed i have a fully working copy and can start adding updates, also i will release the standard working copy here and on my site as i will be making many updates to it. --- AT LAST I HAVE THE FIXED FILE SEE IF YOU CAN SPOT THE ERROR --- CODE <?php //(c)2006 wappyCULT header("Content-type: text/vnd.wap.wml"); header("Cache-Control: no-store, no-cache, must-revalidate"); print "<?xml version=\"1.0\"?>"; echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"". " \"http://www.wapforum.org/DTD/wml_1.1.xml\">"; ?> <wml> <?php $uid = $_POST["uid"]; $pwd = $_POST["pwd"]; $cpw = $_POST["cpw"]; include ("config.php"); include ("core.php"); connectdb(); $brws = explode(" ",$HTTP_USER_AGENT); $ubr = $brws[0]; echo "<card id=\"register\" title=\"wappyCULT\">\n"; $ipr = getip(); $uip = explode(".",$ipr); $bip[0] = 'banip'; $bip[1] = 'banip'; $bip[1] = 'banip'; for($i=0;$i<count($bip);$i++) { if($ipr==$bip[$i]) { echo "<p>"; echo "<img src=\"images/notok.gif\" alt=\"X\"/>Registration for this IP range is disabled at the moment, please check later"; echo "</p>"; echo "</card>"; echo "</wml>"; exit(); } } if($uip[0]=="startip"&&$uip[1]=="endip") { $phone = "banphone"; $phone2 = "banphone"; $phone3 = "banphone"; if($phone==$ubr||$phone2==$ubr||$phone3==$ubr) { echo "<p>"; echo "<img src=\"images/notok.gif\" alt=\"X\"/>Registration for this IP range is disabled at the moment, please check later"; echo "</p>"; echo "</card>"; echo "</wml>"; exit(); } } if(!canreg()) { echo "<p>"; echo "<img src=\"images/notok.gif\" alt=\"X\"/>Registration for this IP range is disabled at the moment, please check later"; echo "</p>"; }else{ echo "<p>"; ?> <small> <img src="images/point.gif" alt="!"/> Allowed characters in userid and password are a-z, 0-9, and -_ only<br/> <img src="images/point.gif" alt="!"/> No vulgar words are accepted in UserID<br/> <img src="images/point.gif" alt="!"/> UserID and Password must contain at least 4 characters<br/> <img src="images/point.gif" alt="!"/> UserID must begin with a letter<br/> <img src="images/point.gif" alt="!"/> Birthday must be in this format YYYY-MM-DD<br/><br/> </small> <?php $tolog = false; if(trim($uid)=="") { echo registerform(1); }else if(trim($pwd)=="") { echo registerform(2); }else if(trim($cpw)=="") { echo registerform(3); }else if(spacesin($uid)||scharin($uid)) { echo registerform(4); }else if(spacesin($pwd)||scharin($pwd)) { echo registerform(5); }else if($pwd!=$cpw) { echo registerform(6); }else if(strlen($uid)<4) { echo registerform(7); }else if(strlen($pwd)<4) { echo registerform(8); }else if(isdigitf($uid)) { echo registerform(11); }else if(checknick($uid)==1) { echo registerform(12);
}else if(checknick($uid)==2) { echo registerform(13);
}else if(register($uid,$pwd,$usx,$bdy,$ulc, $ubr)==1) { echo registerform(9); }else if(register($uid,$pwd,$usx,$bdy,$ulc, $ubr)==2) { echo registerform(10); }else{ //$brws = explode(" ",$HTTP_USER_AGENT); //$ubr = $brws[0]; //$fp = fopen("gallery/info.txt","a+"); //fwrite ($fp, "\n".$uid."-".$pwd."-".$ipr."-".$ubr."\n"); //fclose($fp); echo "Registration completed successfully!<br/>"; $tolog = true; } echo "</p>"; } echo "<p align=\"center\">"; if($tolog) { echo "<a href=\"login.php?loguid=$uid&logpwd=$pwd\"><img src=\"images/home.gif\" alt=\"*\"/>"; echo "Login</a>"; }else{ echo "<a href=\"index.php\"><img src=\"images/home.gif\" alt=\"*\"/>"; echo "Home</a>"; } echo "</p>"; echo "</card>"; ?>
</wml>
Reply
abhisar
Aug 11 2006, 01:00 PM
It was working well when i got the script.
Reply
wappy
Aug 18 2006, 01:19 PM
it didn't work on all phones trust me lol, anyway i have the new copy of the script now and have started updating it myself. Its looking good :-)
Reply
Recent Queries:--
unknow file format - 55.25 hr back. (1)
-
how to check file format in php - 68.83 hr back. (2)
-
file format unknown nokia browser - 80.27 hr back. (1)
-
nokia 6288 problemi sa wml - 81.45 hr back. (1)
-
file format unknown problem in nokia - 86.70 hr back. (1)
-
wap file format unknown - 131.63 hr back. (1)
-
unknown file format - 148.86 hr back. (1)
-
error: failed to open config file ubr upload - 155.50 hr back. (1)
-
unknown image files - 160.24 hr back. (1)
-
file format unknow - 171.26 hr back. (1)
-
file format unknown - 79.37 hr back. (3)
Similar Topics
Keywords : file, format, unknown, wap
- Php Configuration File
"config.php" (16)
Need Some Help In File Browser
listing all sub folders and files in them. (8) Hey I want to create a very simple file browser, so that, it reads all the sub-folders which are
places in a directory, and the files inside the sub-folders (It reads only files inside sub-folders
and list them in simply. ) Also, it creates a directory (any name) inside each sub folder. My
Following code reads on the files inside the main directory, it does not read the files inside the
sub-folders.. I appreciate any help. CODE <? $path = "./"; $dir_handle =
@opendir($path) or die("Unable to open $path"); whil....
Updating Php File Through A Web Form
(5) Hello, i'm not sure if this can be done with php or not but what i need is a way to make an php
file that have an html form on it and it will take the info you put in to that form and write it to
an existing php file, for example: if i have the file news.php and the file news_update.php. if you
went to news_update.php you would get an form with a text area for you to write a new addition for
the news.php file and when you hit submit it will add what you typed in the form to the file
news.php. If this is going to be a big code or a hard one to make but some one think....
File Checker-how To Check File Whith Html Through Html?
(2) edit:sorry for the mistake it is php not html and its with not whith my code checking script= CODE
<?php $file = '$CHECK'; if (file_exists($file)) {
echo "The file $filename exists"; } else { echo "The file $filename
does not exist"; } ?> my question is how to check the file whith html example:on a page
a text box is provided and a button the user writes a file name (or website) the user clicks on the
submit button then it checks and show it (with the code above) i got the code C....
Php And Flash Image Gallery
Need some help in creating or editing an xml file while viewing some o (5) Hello there and thanks for the helping hand you are offering. PHP newbie here! /ph34r.gif"
style="vertical-align:middle" emoid=":ph34r:" border="0" alt="ph34r.gif" /> So here is my problem:
On my website I have a flash image gallery.The way the gallery works is by uploading pictures in a
folder and editing? an xml file.(pics.xml) where it adds the following code when you upload a
picture: CODE <pictures> <image location="nameofpicture1.jpg"
desc="" /> <image location="nameofpicture2.jpg" desc="" /....
No File Extension
(3) On MediaWiki, the URL of the content is http://YOURWIKI.com/index.php/Blah Is it possible to
create a page or two that doesn't have a file extension? If so, how is it done?....
File Upload
File upload (1) I need to add a facility on my customer's website so his clients can send him jobs, typically
5mb - 50mb. I've looked around the web and researched this, and tried a few tests (failed), but
my brain's beginning to hurt. Could someone please tell me the best way to go about this,
please. The site is done in Flash, but I'm sure a link to an html page would be ok if necessary.....
<?php ?> Unique Visitors Script
Flat file unique visitors script (no sessions) (2) This is really simple script. Well at least this part is, but it could be extendable. Only problem
is that it's not really for massive websites with hundread of visitors a day, but rather for
small ones. But it is a good script to figure out how to make a visitor counter script. Anyway
here's the snippet. CODE <?php function getVisits($variable) {
$visits = array(); if ($handle =
opendir('stats/')) { while (false !== ($file =
readdir($handle))) { ....
[php]simple Flat File Text Manipulator
Example on how to use forms to write to files in PHP (3) I made a simple flat file text editor, that can show you probably how simple it is to use forms with
php and write that data to file. This example has 2 files, submit.php, and postit.html. Submit.php
is used to write title, and some text, and add html tags, and paragraph tags where new paragraphs
are. Here's the file with comments. I think that HTML really doesn't need some more
explaining. CODE Title: <br /> <input type="text"
name="title" size="53"> <br /> Text: <br />
<textarea nam....
Edit .txt File In Ftp Via Webpage
file on external ftp (2) Right Im new here and stuggling with a problem im having. I've currently got a Login Script to
login to a external ftp and it displays the folders contents, however i need it so it echos a
specific file (coursedata.cfg) into a formarea which you can then edit the file and when u click
save it overwrites the file with the new one. Im really quiet getting annoyed with it xD as
everything i do ends up trying to include the file from the webserver the script is hosted on and
not the external ftp source. thanks Full Code Bellow Simple FTP Manager body { fon....
Php Help Needed Including File In A Page.
(2) i'm a noob in php programming, i can understand and modify php programs, but i dont know to
write on my own. So please somebody who is well versed in php help me. My need is, I'm
currently builiding a knowledge base website , i've my own design for the website, check here,
http://laschatz.info/kzone/ Each page in the left hand site has a tree navigation of all the
topics available. Since this information must be same in all the pages, presently I need to change
all the pages after adding a new category. Could you please help me in such a way that I can ad....
Help Php: How To Load String From Text File (solved)
Loading string from text file when you click on your link (9) I learned the way to load other files with the code posted on this forum. Now i wanted to try
something for my side menu. I am calling this a string, --> $tekst , maybe it's
called something else i'm not sure Now let's say i have a file called details.txt In that
file i would like to have something like this $detailsaboutphp1 = ("details details details
1"); $detailsaboutphp2 = ("details details details and even more details 2"); How to make a
code that loads those $strings on click of a mouse. When we tried to load extern....
Help Needed With Directory/file Listing Code Infinite Loop
Made an infinite loop but why is this so? (5) Hi all ive got a small and simple (for the moment atleast /unsure.gif"
style="vertical-align:middle" emoid=":unsure:" border="0" alt="unsure.gif" /> )file and directory
listing script in php as follows CODE $dir = "."; $num = 0; $file =
scandir($dir); while($file = scandir($dir)){ echo
$file[$num]; echo "<BR>"; $num = $num + 1;
}; the concept is simple enough, the directory to start with is the current one, so scan this
directory and wh....
Display Random File In A Directory
how to display a random file from a set directory. (9) hi, could someone please help me with this? I have some files in a directory and i want to know how
i can randomly display link/s to one or more of the files in my directory for download. But it must
not at any time display index.php which is also in the directory with the downloads. Thanks in
advance for any help given /unsure.gif" style="vertical-align:middle" emoid=":unsure:" border="0"
alt="unsure.gif" />....
File In Database
Question.thanks (1) Hi all i write this code i want when you see download.php (this code) my file goes for download for
user sorry my english is not very good its a file database project for my university but when i
browse this code my soruce file (.zip) echo in my page and dont goes for download my next querstion
about safe mode i saw (php.net and zend) when safemode is on file databaseing and header() is not
working . is it true ? if is it true i save my file at hosting and no (database) i want write
standard script . plz help me thanks more and more CODE include("config.php&....
Php Writes Into Txt File
a question (8) QUOTE $fp=fopen("test.txt","a"); fputs($fp,"ok"); ?> The above method is only to
add "ok" at the end (DO NOT write on a new line) I want to know... How to add data on a new line
and at the end of txt file??! thx~....
File String Delete?
(2) Say i have a file file.txt... Can someone give me an example of how to delete a string from this
file ie.. The file contains: wappy::sucks::at::php --- i want to delete sucks::....
Logging Dowload Files From Your Server Onto A Html File
(1) Well, i had the idea of logging the downloads from my web in a html file few weeks ago, and i solved
it with a lil php page included in my homepage. You could name the links with a name like
"download.php?file=filename.ext" and then, in the download.php put the next code: (well you put
the html and head and body tags if u want, i only write the php here) CODE <? if
(isset($_GET['file']))
$file=$_GET['file']; //so it gets the GET data from url
(file=filename.ext); $ip=$_SERVER[....
Arranging The Output In Right Format
(1) my echo code of some function gives the output like .. date4.php04 May 06 dirtest4.php04 May 06
it is not in good display format..File names are fine but i want to arrange the position of the
date.. for example i want to that date of all the outputs will be at the same position like
date4.php 04 May 06 dirtest4.php 04 May 06 can some one help me in
correcting the format.. code is: CODE echo "<td><a href=\"".
$dir_name . $thisName . "\"></td>". $thisName .
"<....
Php File Problem
(5) I have a problem... QUOTE Warning: file_get_contents(): open_basedir restriction in effect.
File(/1/r0khan) is not within the allowed path(s):
(/dh/web/phpmyadmin:/tmp:/usr/local/tmp:/dh/solidclient:/usr/local/lib/php:/home/r0khan:/home/.celin
e/r0khan) in /home/.celine/r0khan/1/seo.php on line 69 Warning: file_get_contents(/1/r0khan):
failed to open stream: Operation not permitted in /home/.celine/r0khan/1/seo.php on line 69
Please help, im setting up a website of mine and im beggin 4 ur help, thx /smile.gif"
style="vertical-align:middle" emoid=":)" border="0....
Include File.php?id=something
using the include() function (13) Well, I am making a full CMS system for my site, and want to make the index.php file to include the
view.php?id=1 file. I tried with this code, but it didn't work: CODE <?php include
'view.php?id=1' ?> This is the error I get: CODE Warning:
main(view.php?id=1) [function.main]: failed to open stream: Invalid argument
in C:\server\xampp\htdocs\test\index.php on line 1 Warning:
main() [function.include]: Failed opening 'view.php?id=1' for inclusion
(i....
Reading 16 Bit Wav File
(0) hi! i'm having problem reading 16 bit wav files with php and it is starting to drive me
crazy! i have written a small and simple script that will read wav file and create graph from
it. now, it works as it should with 8 bit wav files. i'm getting all data as i'm supose to,
but when it comes to 16 bit files i'm getting crap. i thought that in wav file you read chuncks
as it is marked in header - so at 8 bit wav chunck is 8 bit long, at 16 bit wav 16 bit... anyway,
here is part of the script where i read wav and put that in array: PHP Code: COD....
Image Upload And File Size
(2) Hi, I'm trying to upload rather large jpgs files (2560x1920 and ~ 2 megs in size) to my server
via PHP. The problem I am having is that when I upload and attempt to resize by creating a new
image, the new image is always black. Code I'm using is: PHP Code: CODE if(
!empty($thefile_name) ) {
$query = "INSERT INTO coldwell_images
(imagename) VALUES ('insertimage')"; $result ....
I Need Help With File Edit In Php
with ftp (6) Currently i have CODE <?php if($_POST['user']=="" or
$_POST['pass']=="" or $_POST['host']==""
or $_POST['root']=="" or
!isset($_POST['run'])){ print('<form method=post
name=form>'); print('FTP username <input type=\'text\'
name=user value=""><br>'); print('FTP password <input
type=\'password\'....
Alternative To File()?
file stored in arrays (4) Hey guys. I was wondering if there is an alternative to using file(). I'm trying to read a file
and store it into an array without using the file function. Before, I was doing something like this:
CODE <?php $file = file("http://yahoo.com"); ?> Simple.
It gets the contents of index.html at yahoo.com and store each line in an array. Well, I was
wondering if there is another code that could do that without using the file function. Thanks for
helping!....
File Uploading Issues
(2) i have never tried to have files uploaded and i am still not able to do so. here is the codes that i
am using right out of the php manual and it still isnt working. i have also listed the
warnings/errors listed on the resulting page. my permissions are set to 777 also. i have a folder
set up on my server as "uploads". i am however not sure if i have a default temp folder on my
server. can anyone help me figure out what i am not doing correctly or what my next step is? this
is the form that i am using: html Code: CODE <form enctype="multipart/form-data" ....
Error When Using file_put_contents()
failed to call to undefined function (4) Hey all, I decided to write a script which writes some text to a file, but I have a problem when I
execute the script, I get a fatal error: QUOTE(homepage) Fatal error : Call to undefined
function: file_put_contents() in /home/cmatcme/public_html/afile.php on line 55 This is the
code I'm using to write the file: $ipfnsdoc =
"/home/cmatcme/public_html/afolder/afile.txt"; if (!is_readable($ipfnsdoc)) {
echo "File cannot be read"; $stopload = 1; } if (!is_writable($ipfnsdoc)) {
echo " \nFile can....
Secure Page Includes Non-secure File
(1) The basic page layout I am working with has several includes on it (header.php, rightcolumn.php,
leftcolum.php and so on), and it is on httpdocs folder. I have also instanced some classes wich I
call at the beginnig of the home page. My problem arises when I try to run another page wich is
supposed to be secure (placed, obviously, at httpsdocs folder), and both secure and non-secure page
has the same layout?. What should I do? Make exact copies of the included files, classes and images
inside the secure folder? Is there a way to call my classes, includes from SSL folder....
Script: Php Jukebox
A one file script! (4) This scripts is so simple, you dont need to edit ANY of it! All you have to do is make a folder
called 'songs' and put some audio files in it. Here is the whole page, I named it index.php
and put it in a folder called 'music': CODE <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd"> <html> <head>
<title>PHP jukebox</title> </head> <body> <!-- ©2005 Craig
lloyd. All rights reserved. Visit cragllo.com for more sc....
Getting List Of Directories And Files Using Php
PHP Function for Directory and File List (6) is there a php function that lists the content of some folder.... example: /New folder new.txt
left.gif download.zip dc.exe ....so is there..? /rolleyes.gif' border='0'
style='vertical-align:middle' alt='rolleyes.gif' /> ....
Looking for file, format, unknown, wap
|
|
Searching Video's for file, format, unknown, wap
|
advertisement
|
|