This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* I'm nnot the author but for good reference | |
* Class RD_Text_Extraction | |
* | |
* Example usage: | |
* | |
* $response = RD_Text_Extraction::convert_to_text($path_to_valid_file); | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
http: //testphp.vulnweb.com/search.php?test=query | |
$pdo = new PDO('msql:host=vulnweb.com;dbname=vulnweb', 'dbuser', 'dbpassword'); | |
$query = "SELECT * FROM searchabletable WHERE topic LIKE :keyword"; | |
$stmt = $pdo->prepare($query); | |
$stmt->bindValue(':keyword', '%' . $variable . '%'); | |
$stmt->execute(); | |
// fetch results |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Using php, Native approaches involve like htmlspecialchars() to escape special characters in the user input. | |
$Userdata; | |
$sanitized = htmlspecialchars($Userdata); | |
// output | |
echo " <p> Your data is:" . $sanitized . " </p>"; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// | |
$origin = $_SERVER['HTTP_ORIGIN']; | |
if ($origin == "http://www.domain1.com" | |
|| $origin == "http://www.domain2.com" | |
|| $origin == "http://www.domain3.com") { | |
header("Access-Control-Allow-Origin: $origin"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
table { | |
border-collapse: collapse; | |
border-radius: 1em 1em 0em 0em ; /*** adjust shorthand as you will need **/ | |
overflow: hidden; /** without this property, you wouldn't see the effect **/ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types=1); | |
namespace DemoPhpframework; | |
/** | |
* Dependency Injection from a bible Base Creation Story Example | |
* | |
* First what is Dependency Injection: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types=1); | |
namespace DemoPhpframework; | |
/** | |
* Dependency Injection from a bible Base Creation Example | |
* | |
* First what is Dependency Injection: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class culrpost | |
{ | |
protected $url; | |
protected $curl; | |
public $result; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Complete the 'timeConversion' function below. | |
* | |
* The function is expected to return a STRING. | |
* The function accepts STRING s as parameter. | |
*/ | |
function timeConversion($s) { |
OlderNewer