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?

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

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
 
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
 
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

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

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Kürzlich hochgeladen (20)

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 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...
 
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
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
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 Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 

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.