This file contains hidden or 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://stackoverflow.com/questions/3080146/post-data-to-a-url-in-php | |
$url = 'http://www.someurl.com'; | |
$myvars = 'myvar1=' . $myvar1 . '&myvar2=' . $myvar2; | |
$ch = curl_init( $url ); | |
curl_setopt( $ch, CURLOPT_POST, 1); | |
curl_setopt( $ch, CURLOPT_POSTFIELDS, $myvars); | |
curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1); |
This file contains hidden or 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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>The HTML5 Herald</title> | |
<meta name="description" content="The HTML5 Herald"> | |
<meta name="author" content="SitePoint"> |
This file contains hidden or 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
################################################################################################################ | |
################################################################################################################ | |
# purpose of this program is to scrap data from a page using lxml and Xpath | |
# original tutorial found at http://docs.python-guide.org/en/latest/scenarios/scrape/ | |
# here we go | |
### was told to install lxml using | |
### pip install lxml ###CONTINUE READING BEFORE INSTALLING | |
### pip install requests ###CONTINUE READING BEFORE INSTALLING |
This file contains hidden or 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
:set number | |
:set autoindent | |
:set tabstop=4 | |
:imap jj <Esc> | |
v /word Enter //begin visual select and select until first occurance of word | |
0 // beginning of line | |
gm // go to middle | |
gg // go to bottom | |
G // go to top |
This file contains hidden or 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 | |
// define variables and set to empty values | |
$name = $email = $gender = $comment = $website = ""; | |
if ($_SERVER["REQUEST_METHOD"] == "POST") { | |
$name = test_input($_POST["name"]); | |
$email = test_input($_POST["email"]); | |
$website = test_input($_POST["website"]); | |
$comment = test_input($_POST["comment"]); | |
$gender = test_input($_POST["gender"]); |
NewerOlder