Hello world!

Posted in MY CREATIONS on October 3, 2010 by Anurag Das

ONE WHO JUST LEADS IS NOT A LEADER………LEADER SHOULD B LYK THE SUN….STANDING IN MIDDLE ,BUT YET CONTROLLING ALL ITS RAYS TOGETHER

anurag

Advertisements

php code to upload files in a website

Posted in PHP on January 7, 2013 by Anurag Das

Well, there are situations when the great database management system (dbms) fails in front of the old files handling system .

while creating my newest website http://www.appdroidbcrec.tk/ which has the facility to uploading and downloading android apps.

during this course i needed a database to store the *.apk files(android apps) and the zip files(source code ) .Initially i tried out sql but it didn’t helped me out,so i used php files handling concept and then very easily i got the success.

Am giving the code i have used in my website admin part  http://www.appdroidbcrec.tk/admin.php for files upload and download

all you need is

1. create the form to upload your file ,your index page code would be

<html>
<body>
<form action=”upload_file.php” method=”post”
enctype=”multipart/form-data”>
<label for=”file”>Filename:</label>
<input type=”file” name=”file” id=”file”><br>
<input type=”submit” name=”submit” value=”Submit”>
</form>
</body>
</html>

2. now the php code for upload_file.php will be :

<?php
if ($_FILES[“file”][“error”] > 0)
{
echo “Error: ” . $_FILES[“file”][“error”] . “<br>”;
}
else
{
echo “Upload: ” . $_FILES[“file”][“name”] . “<br>”;
echo “Type: ” . $_FILES[“file”][“type”] . “<br>”;
echo “Size: ” . ($_FILES[“file”][“size”] / 1024) . ” kB<br>”;
echo “Stored in: ” . $_FILES[“file”][“tmp_name”];
}
?>

<?php
if ($_FILES[“file”][“error”] > 0)
{
echo “Error: ” . $_FILES[“file”][“error”] . “<br>”;
}
else
{
echo “Upload: ” . $_FILES[“file”][“name”] . “<br>”;
echo “Type: ” . $_FILES[“file”][“type”] . “<br>”;
echo “Size: ” . ($_FILES[“file”][“size”] / 1024) . ” kB<br>”;
echo “Stored in: ” . $_FILES[“file”][“tmp_name”];
}

?>

<?php

if ($_FILES[“file”][“error”] > 0)
{
echo “Return Code: ” . $_FILES[“file”][“error”] . “<br>”;
}
else
{
echo “Upload: ” . $_FILES[“file”][“name”] . “<br>”;
echo “Type: ” . $_FILES[“file”][“type”] . “<br>”;
echo “Size: ” . ($_FILES[“file”][“size”] / 1024) . ” kB<br>”;
echo “Temp file: ” . $_FILES[“file”][“tmp_name”] . “<br>”;

if (file_exists(“upload/” . $_FILES[“file”][“name”]))
{
echo $_FILES[“file”][“name”] . ” already exists. “;
}
else
{
move_uploaded_file($_FILES[“file”][“tmp_name”],
“upload/” . $_FILES[“file”][“name”]);
echo “Stored in: ” . “upload/” . $_FILES[“file”][“name”];
}
}
?>

3.to create a folder name upload

its very easy….

just create a folder name upload to store your files and change its permission using CHMOD of your respective web hosting site by assigning a value of 777 to it

and UPLOADING IS DONE.. 🙂

Now for downloading the uploaded file .. read my next post ..:-)

INCREASE YOUR BRODBAND SPEED

Posted in HACKING on October 14, 2010 by Anurag Das

I am a broadband user,and its really irritates when our net get slows down.

So My computer assembler once suggested A Simple Tweak for XP Pro only, which increases our Broadband Speed.if u too want to increase your broadband speed,then follow the steps ,I have chopped it down in points ,so that its become easier for you all….

But before that Make sure you Log on as Administrator, not as a user with Administrator privileges.

Follow the steps as given below-

1) Click on Start Button.

2) Select Run From Start Menu.

3) Type gpedit.msc

4) Expand the [Administrative Templates] branch.

5) Then Expand the [Network] branch.

6) Highlight(Select by Single Click) [QoS Packet Scheduler]

7) Double-click [Limit Reservable Bandwidth] (Available in Right Side Panel)

8) Check(Select By Single Click on it) [Enabled]

9) Change [Bandwidth limit %] to 0 %

10) Click [OK] Button.

11) Restart Your PC.

12) Now Check Your Broadband Speed.

USING VODAFONE GPRS FOR FREE

Posted in HACKING on October 14, 2010 by Anurag Das

I personally tried this method on my nokia mobile and its really works.just take a Vodafone connection from ur nearest vodafone outlet

Followng are the Settings you require to configure on your Mobile:

Account Name: Vodafone_gprs
Homepage: http://live.vodafone.in
User Name: (no need)
Pass: (no need)

Access Point Settings :-
Proxy: Enabled
Proxy Address: 10.10.1.100
Proxy Port: 9401
Data Bearer: Packet Data

Bearer Settings :-
Packet Data Access Point: portalnmms
Network type: IPV4
Authentication: normal
User Name: (no need)
Password: (no need)

This setting is applicable for all mobiles, especially any NOKIA handsets,for other handsets,IF  this settings is not working then change the proxy port number to:-

Proxy Port: 9401

Posted in MY CREATIONS on October 12, 2010 by Anurag Das

D street dat i left behind..in d city which is nolonger mine…

YES, jst a year back here i use to hang out wid my frnds..and use to make my own trends…

Once again m back in my town n walkin thru does street again…

bt nw m gettin nostalgic coz nw m on d opposite lane… lookin arround newhere now…,in evry teenager m findin myself now…..

perhaps dis phase of mine is over..but dese swt memories r gonna stay wid me forevr..

i hav left my PARADISE ON EARTH far behind..

ANURAG

Posted in MY CREATIONS on October 12, 2010 by Anurag Das

this is a short poem which i had dedicated to my home towm JAMSHEDPUR ……….hope the guys out here,who stays away frm their home,lyk this….