-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathfunctions.php
More file actions
26 lines (21 loc) · 824 Bytes
/
functions.php
File metadata and controls
26 lines (21 loc) · 824 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php
// Twitter for OpenSim (not an app) v0.1.3
// Developed by devi S.A.S - http://devi.com.co
// Source code: http://github.com/deviSAS/twitter-opensim
// Commercial use not allowed. Share & Remix
function getPage($web, $body='') {
$html = "";
$ch = curl_init($web);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.12) Gecko/20070508 Firefox/1.5.0.12");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_AUTOREFERER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 5);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $body);
$html = curl_exec($ch);
if(curl_errno($ch)) $html = "";
curl_close ($ch);
return $html;
}