SlideShare ist ein Scribd-Unternehmen logo
1 von 22
Passing parameters & Session Tracking in PHP Prof. Ami Tusharkant Choksi Assistant Professor, Computer Engg. Dept., C.K.Pithawalla College of Engg. & Tech., Surat, Gujarat State, India.
What is Parameter Passing & Session Tracking? -> Values of the text typed in user form is passed to other HTML and/or server side script is called  parameter passing . -> A  session  refers to all the connections that a single client might make to a server in the course of viewing any pages associated with a given application.[1] -> Maintenance of user's state during session(e.g.login to logout) is called a  Session Tracking .
Ways ,[object Object],[object Object],[object Object],[object Object],[object Object]
Parameter Passing with <Form> ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Predefined Variables[2] ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
List of predefined variables [2]... ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
The values of Predefined Variables ,[object Object],[object Object],[object Object],[object Object]
File Upload ,[object Object],[object Object],[object Object],[object Object],[object Object]
File Upload HTML page in Browser
Required Configuration in /etc/php.ini File ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Retrieval of File at Server #/uploads must be having o+rwx permission $uploaddir = &quot;/uploads/&quot;; $uploadfile = $uploaddir . basename($_POST[&quot;filename&quot;]); if (move_uploaded_file($_FILES[&quot;filename&quot;][&quot;tmp_name&quot;], $uploadfile)) { echo &quot;File is valid, and was successfully uploaded.&quot;; } else { echo &quot;Possible file upload attack!&quot;; }
Session Tracking is done with ,[object Object],[object Object],[object Object],[object Object],[object Object]
Hidden Parameter Passing ,[object Object],[object Object],[object Object],[object Object],[object Object]
Cookies [2] ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Session [2] ,[object Object]
Session Functions [2] session_cache_expire — Return current cache expire session_cache_limiter — Get and/or set the current cache limiter session_commit — Alias of session_write_close session_decode — Decodes session data from a string session_destroy — Destroys all data registered to a session session_encode — Encodes the current session data as a string session_get_cookie_params — Get the session cookie parameters session_id — Get and/or set the current session id session_is_registered — Find out whether a global variable is registered in a session session_module_name — Get and/or set the current session module session_name — Get and/or set the current session name session_regenerate_id — Update the current session id with a newly generated one session_register — Register one or more global variables with the current session session_save_path — Get and/or set the current session save path session_set_cookie_params — Set the session cookie parameters session_set_save_handler — Sets user-level session storage functions session_start — Initialize session data session_unregister — Unregister a global variable from the current session session_unset — Free all session variables session_write_close — Write session data and end session
Examples ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Example... ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
URL Re-Writing ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Required Configuration and Examples ,[object Object],[object Object],[object Object],[object Object],[object Object]
Retrieval of URL Rewriting Data ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
References ,[object Object],[object Object]

Weitere Àhnliche Inhalte

Was ist angesagt?

kazumich@acmscamp2010spring
kazumich@acmscamp2010springkazumich@acmscamp2010spring
kazumich@acmscamp2010spring
Kazumich YAMAMOTO
 
Simple php backdoor_by_dk
Simple php backdoor_by_dkSimple php backdoor_by_dk
Simple php backdoor_by_dk
Stan Adrian
 

Was ist angesagt? (20)

Session php
Session phpSession php
Session php
 
Pemrograman Web 9 - Input Form DB dan Session
Pemrograman Web 9 - Input Form DB dan SessionPemrograman Web 9 - Input Form DB dan Session
Pemrograman Web 9 - Input Form DB dan Session
 
Fluid content rendering
Fluid content renderingFluid content rendering
Fluid content rendering
 
Pemrograman Web 8 - MySQL
Pemrograman Web 8 - MySQLPemrograman Web 8 - MySQL
Pemrograman Web 8 - MySQL
 
TICT #11
TICT #11 TICT #11
TICT #11
 
M.php
M.phpM.php
M.php
 
TICT #13
TICT #13TICT #13
TICT #13
 
kazumich@acmscamp2010spring
kazumich@acmscamp2010springkazumich@acmscamp2010spring
kazumich@acmscamp2010spring
 
season management in php (WT)
season management in php (WT)season management in php (WT)
season management in php (WT)
 
PHP and Databases
PHP and DatabasesPHP and Databases
PHP and Databases
 
Login and Registration form using oop in php
Login and Registration form using oop in phpLogin and Registration form using oop in php
Login and Registration form using oop in php
 
Php
PhpPhp
Php
 
Coding In Php
Coding In PhpCoding In Php
Coding In Php
 
Manish
ManishManish
Manish
 
Java script
Java scriptJava script
Java script
 
PHP Programming: Intro
PHP Programming: IntroPHP Programming: Intro
PHP Programming: Intro
 
Databases and MySQL
Databases and MySQLDatabases and MySQL
Databases and MySQL
 
Codigo
CodigoCodigo
Codigo
 
Php
PhpPhp
Php
 
Simple php backdoor_by_dk
Simple php backdoor_by_dkSimple php backdoor_by_dk
Simple php backdoor_by_dk
 

Andere mochten auch

KarjÀÀri Plaan
KarjÀÀri PlaanKarjÀÀri Plaan
KarjÀÀri Plaan
guestd7ca449
 
C:\Fakepath\Promote Awud
C:\Fakepath\Promote AwudC:\Fakepath\Promote Awud
C:\Fakepath\Promote Awud
CSFBookman
 
Web 3 0 Krista Thomas
Web 3 0 Krista ThomasWeb 3 0 Krista Thomas
Web 3 0 Krista Thomas
guest4513a7
 
Web 3 0 Peter Sweeney
Web 3 0 Peter SweeneyWeb 3 0 Peter Sweeney
Web 3 0 Peter Sweeney
guest4513a7
 
is globalization the new colonization of the new era?
is globalization the new colonization of the new era?is globalization the new colonization of the new era?
is globalization the new colonization of the new era?
Daniel
 
Grade1 PAC
Grade1 PACGrade1 PAC
Grade1 PAC
UNIS Hanoi
 
Follow my voice pp edits (july 4th) [1][2]
Follow my voice pp edits (july 4th) [1][2]Follow my voice pp edits (july 4th) [1][2]
Follow my voice pp edits (july 4th) [1][2]
Virtual Team Builders
 
E:\Iprimi30
E:\Iprimi30E:\Iprimi30
E:\Iprimi30
stefylanaro
 
MS Cognitive Issues by Justin C. Koenitzer, Psy.d.
MS Cognitive Issues   by Justin C. Koenitzer, Psy.d.MS Cognitive Issues   by Justin C. Koenitzer, Psy.d.
MS Cognitive Issues by Justin C. Koenitzer, Psy.d.
Eric
 

Andere mochten auch (20)

KarjÀÀri Plaan
KarjÀÀri PlaanKarjÀÀri Plaan
KarjÀÀri Plaan
 
Young Adults And On Line Privacy
Young Adults And On Line PrivacyYoung Adults And On Line Privacy
Young Adults And On Line Privacy
 
Mastering Analytics and Integrations - Brightedge Share 2016 Speaking Engagement
Mastering Analytics and Integrations - Brightedge Share 2016 Speaking EngagementMastering Analytics and Integrations - Brightedge Share 2016 Speaking Engagement
Mastering Analytics and Integrations - Brightedge Share 2016 Speaking Engagement
 
Kuormausnosturin kÀyttö Volvo FH12 ja Hiab 330
Kuormausnosturin kÀyttö Volvo FH12 ja Hiab 330Kuormausnosturin kÀyttö Volvo FH12 ja Hiab 330
Kuormausnosturin kÀyttö Volvo FH12 ja Hiab 330
 
Sws Event
Sws EventSws Event
Sws Event
 
C:\Fakepath\Promote Awud
C:\Fakepath\Promote AwudC:\Fakepath\Promote Awud
C:\Fakepath\Promote Awud
 
SSI
SSISSI
SSI
 
Web 3 0 Krista Thomas
Web 3 0 Krista ThomasWeb 3 0 Krista Thomas
Web 3 0 Krista Thomas
 
Web 3 0 Peter Sweeney
Web 3 0 Peter SweeneyWeb 3 0 Peter Sweeney
Web 3 0 Peter Sweeney
 
is globalization the new colonization of the new era?
is globalization the new colonization of the new era?is globalization the new colonization of the new era?
is globalization the new colonization of the new era?
 
Grade1 PAC
Grade1 PACGrade1 PAC
Grade1 PAC
 
Prasantation For Media Persanal 21 12 09
Prasantation For Media Persanal 21 12 09Prasantation For Media Persanal 21 12 09
Prasantation For Media Persanal 21 12 09
 
Follow my voice pp edits (july 4th) [1][2]
Follow my voice pp edits (july 4th) [1][2]Follow my voice pp edits (july 4th) [1][2]
Follow my voice pp edits (july 4th) [1][2]
 
TTS Työtehoseura nostotöiden turvallisuus
TTS Työtehoseura nostotöiden turvallisuusTTS Työtehoseura nostotöiden turvallisuus
TTS Työtehoseura nostotöiden turvallisuus
 
what is excel??
what is excel??what is excel??
what is excel??
 
Portt
PorttPortt
Portt
 
Advertising in the Kyiv metro 2010
Advertising in the Kyiv metro 2010Advertising in the Kyiv metro 2010
Advertising in the Kyiv metro 2010
 
E:\Iprimi30
E:\Iprimi30E:\Iprimi30
E:\Iprimi30
 
MS Cognitive Issues by Justin C. Koenitzer, Psy.d.
MS Cognitive Issues   by Justin C. Koenitzer, Psy.d.MS Cognitive Issues   by Justin C. Koenitzer, Psy.d.
MS Cognitive Issues by Justin C. Koenitzer, Psy.d.
 
past simple. english presetation 1
past simple. english presetation 1past simple. english presetation 1
past simple. english presetation 1
 

Ähnlich wie Parameter Passing & Session Tracking in PHP

Web Scraping with PHP
Web Scraping with PHPWeb Scraping with PHP
Web Scraping with PHP
Matthew Turland
 
Php security3895
Php security3895Php security3895
Php security3895
PrinceGuru MS
 
Web Scraping with PHP
Web Scraping with PHPWeb Scraping with PHP
Web Scraping with PHP
Matthew Turland
 
Php file upload, cookies & session
Php file upload, cookies & sessionPhp file upload, cookies & session
Php file upload, cookies & session
Jamshid Hashimi
 
How to Create Login and Registration API in PHP.pdf
How to Create Login and Registration API in PHP.pdfHow to Create Login and Registration API in PHP.pdf
How to Create Login and Registration API in PHP.pdf
Appweb Coders
 

Ähnlich wie Parameter Passing & Session Tracking in PHP (20)

PHP SESSIONS & COOKIE.pptx
PHP SESSIONS & COOKIE.pptxPHP SESSIONS & COOKIE.pptx
PHP SESSIONS & COOKIE.pptx
 
PHP-Cookies-Sessions.pdf
PHP-Cookies-Sessions.pdfPHP-Cookies-Sessions.pdf
PHP-Cookies-Sessions.pdf
 
Php frameworks
Php frameworksPhp frameworks
Php frameworks
 
Http and security
Http and securityHttp and security
Http and security
 
Sessions n cookies
Sessions n cookiesSessions n cookies
Sessions n cookies
 
Lecture8 php page control by okello erick
Lecture8 php page control by okello erickLecture8 php page control by okello erick
Lecture8 php page control by okello erick
 
05 File Handling Upload Mysql
05 File Handling Upload Mysql05 File Handling Upload Mysql
05 File Handling Upload Mysql
 
Ph
PhPh
Ph
 
Web Scraping with PHP
Web Scraping with PHPWeb Scraping with PHP
Web Scraping with PHP
 
Lecture 11 - PHP - Part 5 - CookiesSessions.ppt
Lecture 11 - PHP - Part 5 - CookiesSessions.pptLecture 11 - PHP - Part 5 - CookiesSessions.ppt
Lecture 11 - PHP - Part 5 - CookiesSessions.ppt
 
Php BASIC
Php BASICPhp BASIC
Php BASIC
 
Php security3895
Php security3895Php security3895
Php security3895
 
PHP Security
PHP SecurityPHP Security
PHP Security
 
Web Security
Web SecurityWeb Security
Web Security
 
Web Scraping with PHP
Web Scraping with PHPWeb Scraping with PHP
Web Scraping with PHP
 
Php file upload, cookies & session
Php file upload, cookies & sessionPhp file upload, cookies & session
Php file upload, cookies & session
 
How to Create Login and Registration API in PHP.pdf
How to Create Login and Registration API in PHP.pdfHow to Create Login and Registration API in PHP.pdf
How to Create Login and Registration API in PHP.pdf
 
Web application security
Web application securityWeb application security
Web application security
 
Php mysql ppt
Php mysql pptPhp mysql ppt
Php mysql ppt
 
Create a web-app with Cgi Appplication
Create a web-app with Cgi AppplicationCreate a web-app with Cgi Appplication
Create a web-app with Cgi Appplication
 

KĂŒrzlich hochgeladen

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

KĂŒrzlich hochgeladen (20)

Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 

Parameter Passing & Session Tracking in PHP

  • 1. Passing parameters & Session Tracking in PHP Prof. Ami Tusharkant Choksi Assistant Professor, Computer Engg. Dept., C.K.Pithawalla College of Engg. & Tech., Surat, Gujarat State, India.
  • 2. What is Parameter Passing & Session Tracking? -> Values of the text typed in user form is passed to other HTML and/or server side script is called parameter passing . -> A session refers to all the connections that a single client might make to a server in the course of viewing any pages associated with a given application.[1] -> Maintenance of user's state during session(e.g.login to logout) is called a Session Tracking .
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9. File Upload HTML page in Browser
  • 10.
  • 11. Retrieval of File at Server #/uploads must be having o+rwx permission $uploaddir = &quot;/uploads/&quot;; $uploadfile = $uploaddir . basename($_POST[&quot;filename&quot;]); if (move_uploaded_file($_FILES[&quot;filename&quot;][&quot;tmp_name&quot;], $uploadfile)) { echo &quot;File is valid, and was successfully uploaded.&quot;; } else { echo &quot;Possible file upload attack!&quot;; }
  • 12.
  • 13.
  • 14.
  • 15.
  • 16. Session Functions [2] session_cache_expire — Return current cache expire session_cache_limiter — Get and/or set the current cache limiter session_commit — Alias of session_write_close session_decode — Decodes session data from a string session_destroy — Destroys all data registered to a session session_encode — Encodes the current session data as a string session_get_cookie_params — Get the session cookie parameters session_id — Get and/or set the current session id session_is_registered — Find out whether a global variable is registered in a session session_module_name — Get and/or set the current session module session_name — Get and/or set the current session name session_regenerate_id — Update the current session id with a newly generated one session_register — Register one or more global variables with the current session session_save_path — Get and/or set the current session save path session_set_cookie_params — Set the session cookie parameters session_set_save_handler — Sets user-level session storage functions session_start — Initialize session data session_unregister — Unregister a global variable from the current session session_unset — Free all session variables session_write_close — Write session data and end session
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.