Created
January 31, 2011 19:43
-
-
Save Mikulas/804656 to your computer and use it in GitHub Desktop.
TwiDAQ API
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 | |
$uri = 'http://twidaq.com/account/my-portfolio/'; | |
$session = ''; // Tohle je jedinej problém, ale má velikou expiraci, takže to stačí jednou za čas opravit | |
$domain = 'twidaq.com'; | |
$path = '/'; | |
$c = curl_init(); | |
curl_setopt($c, CURLOPT_URL, $uri); | |
// curl_setopt($c, CURLOPT_FOLLOWLOCATION, TRUE); | |
curl_setopt($c, CURLOPT_RETURNTRANSFER, TRUE); | |
curl_setopt($c, CURLOPT_VERBOSE, FALSE); | |
curl_setopt($c, CURLOPT_COOKIE, "PHPSESSID=$session; path=$path"); | |
curl_setopt($c, CURLOPT_USERAGENT, 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_0; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.215 Safari/534.10'); | |
$response = curl_exec($c); | |
echo $response; | |
curl_close($c); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment