FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Desperately Seeking Help!





MadeinIndia
Hi!

I need a PHP script to be installed. I have the code etc but I really don't have a clue! Can anyone please help me with this urgently? I also don't have much $frihs to give!! Sad I really really appreciate your assistance!
fromegame
MadeinIndia wrote:
Hi!

I need a PHP script to be installed. I have the code etc but I really don't have a clue! Can anyone please help me with this urgently? I also don't have much $frihs to give!! Sad I really really appreciate your assistance!


Give more information about what you want to do.. you can't install php scripts.. do you mean uploading maybe?
MadeinIndia
Hi

The script can be found at http://www.developershome.com/wap/wapUpload/

It is about uploading pictures from your mobile to your webpage. I just need someone who can just install the whole thing for me.
jabapyth
this looks like just a basic upload script.
Heres the HTML
Code:
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>File Upload Example</title>
  </head>

  <body>
    <h1>Welcome to our photo album.</h1>

    <form action="file_upload.php" method="post" enctype="multipart/form-data">
      <p><br/>
        Choose a photo to upload to the WAP server:
        <input name="myFile" type="file"/><br/>
        On the WAP server, save the file as: (Enter something here if you want the file to be saved in a different file name.)
        <input name="filename" type="text"/>
      </p>

      <hr/>

      <p>
        <input type="submit"/>
        <input type="reset"/>
      </p>
    </form>
  </body>
</html>

And Heres the PHP
Code:
<?php header('Content-type: application/vnd.wap.xhtml+xml'); ?>
<?php echo '<?xml version="1.0"?' . '>'; ?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>File Upload Example</title>
  </head>

  <body>
    <h1>Data Received at the Server</h1>
    <hr/>
    <p>

<?php
foreach ($_POST as $key => $value){
?>

<b>Name-value Pair Info:</b><br/>
Field name: <?php echo $key; ?><br/>
Field value: <?php echo $value; ?><br/><br/>

<?php
}

$optionalFileName = $_POST['filename'];

if ($_FILES['myFile']['error'] == UPLOAD_ERR_OK){
  $fileName = $_FILES['myFile']['name'];
?>

<b>Uploaded File Info:</b><br/>
Content type: <?php echo $_FILES['myFile']['type']; ?><br/>
Field name: myFile<br/>
File name: <?php echo $fileName; ?><br/>
File size: <?php echo $_FILES['myFile']['size']; ?><br/><br/>

<?php
  /* Save the uploaded file if its size is greater than 0. */
  if ($_FILES['myFile']['size'] > 0){
    if ($optionalFileName == "")
      $fileName = basename($fileName);
    else
      $fileName = $optionalFileName;

    $dirName = '/file_uploads/';

    if (move_uploaded_file($_FILES['myFile']['tmp_name'], $dirName . $fileName)){
?>

<b>The uploaded file has been saved successfully.</b>

<?php
    }
    else{
?>

<b>An error occurred when we tried to save the uploaded file.</b>

<?php
    }
  }
}
?>

    </p>
  </body>
</html>

Just upload those to you site! Very Happy
jabapyth
i guess i could do it for you, if you want. just PM me your info.
MadeinIndia
Thanks so much! But I thought you needed a XML file as it is supposed to be browsed thru a WAP browser?

Do you also need to create a database?

Tell me what details you need and I will create the necessary stuff and give you the login and password. Your support is really appreciated!
Related topics
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.