Jump to content

Lustre

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Everything posted by Lustre

  1. Hello I've been trying to login to a website using cURL, and display it's contents from the members area. This is the code I have so far: <?php $cookie="cookie.txt"; $postdata = "lkgqfwwxzvln=username&lickrxkXVSQecjgUJguaIXtgohvojodeUVRQrnDLXUEGQEn=password"; $ch = curl_init(); curl_setopt ($ch, CURLOPT_URL, "https://account.perfectworld.com/login"); curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6"); curl_setopt ($ch, CURLOPT_TIMEOUT, 60); curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt ($ch, CURLOPT_COOKIEJAR, $cookie); curl_setopt ($ch, CURLOPT_REFERER, "http://core.perfectworld.com/home/"); curl_setopt ($ch, CURLOPT_POSTFIELDS, $postdata); curl_setopt ($ch, CURLOPT_POST, 1); $result = curl_exec ($ch); curl_close($ch); echo $result; exit; ?> I tried it at a wordpress login, and it worked very well. However, it doesn't seem to work with perfectworld.com, since the page returned says "Our sincerest apologies, we cannot provide service to players in your region or to players using open proxies.". Seems like they are detecting it somehow. Any way to bypass this? What I'm intending to do is parse out my character's level etc. which is available when logged in. thanks
  2. That almost worked, lol. I noticed that the "u" in "member.php\?u=(.*?)" screws up. I changed it to "member.php\?(.*?)" and it worked. Even though it returns strings such as ?s=021ed82677b143ddc8d96e1422f5fd5f&u=10122817001 I have no idea where the "?s=021ed82677b143ddc8d96e1422f5fd5f&" part comes from, since its not even in the source code. but that's ok. I'll use substr() to get the part I want. thank you!
  3. Nah this is not it, since the member ID is not a part of the URL, its just a link posted on a website. (which is not my site) tried , but its all empty. it returns: Array ( [0] => Array ( ) [1] => Array ( ) )
  4. Hey, I'm new here. I need some help with parsing info from a website. The website contains lots of links like <span style="cursor:pointer" onclick="window.open('member.php?u=10362489002', '_self')"> And I want to find get the ID of each member from all of the links. (in the code above: 10362489002) This is the code I got so far, which does not return anything <?php $d = file_get_contents('http://url_here.com'); preg_match_all('/member.php?u=([0-9]+)"\'/', $d, $ma); var_dump($ma); ?> How should I make the pattern? thanks
×
×
  • 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.