Jump to content

get data from other webpage


TheSky

Recommended Posts

Hey agen ;)

i have problem i need info from other webpage

<?php
// get as ?
$url=$_GET['url'];

// value of script
$website = $url;
$referer = 'olar.eu';
$useragent = 'Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)';
$filename = basename($url);

// connect
$curl_handle=curl_init();
curl_setopt($curl_handle,CURLOPT_USERAGENT,$useragent); 
curl_setopt($curl_handle,CURLOPT_AUTOREFERER,$referer);
curl_setopt($curl_handle,CURLOPT_URL,$website);
curl_setopt($curl_handle,CURLOPT_CONNECTTIMEOUT,5);
curl_setopt($curl_handle,CURLOPT_RETURNTRANSFER,1);

$source = curl_exec ($curl_handle);
curl_close ($curl_handle);

$a=preg_match("/>Level:.*.\n.*.>([0-9]*)</",$source,$b);
$Level = $b[1];
echo "Level: $Level";
?>

i get only empty value

url=http://www.gamersfirst.com/warrock/?q=Player&nickname=admin-b13r

Link to comment
https://forums.phpfreaks.com/topic/236866-get-data-from-other-webpage/
Share on other sites

i just tryed with http%3A%2F%2Fwww.gamersfirst.com%2Fwarrock%2F%3Fq%3DPlayer%26nickname%3Destonia8 and it is working

 

now i have question how i can convert

http://www.gamersfirst.com/warrock/?q=Player&nickname=estonia8

to

http%3A%2F%2Fwww.gamersfirst.com%2Fwarrock%2F%3Fq%3DPlayer%26nickname%3Destonia8

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.