mIRC Homepage
Posted By: tparry connecting to facebook via socks - 22/03/08 05:18 AM
Is it possible to connect to facebook via mIRC?
Im using mIRC 6.16.
I have the SSL dlls in my mIRC and system32 ($sslready = $true).
I tried writing this script but the only output I get is "connection made". Any clues?

alias get.fb.login {
sockclose get.fb.login
sockopen -e get.fb.login login.facebook.com 443
}
on *:sockopen:get.fb.login:{
if (!$sockerr) {
var %form = email=me@gmail.com&pass=mypassword
//echo 4 -a connection made
sockwrite -n $sockname POST /login.php HTTP/1.1
sockwrite -n $sockname Host: login.facebook.com
sockwrite -n $sockname Content-Type: application/x-www-form-urlencoded
sockwrite -n $sockname Content-Length: $len(%form)
sockwrite -n $sockname Connection: Keep-Alive
sockwrite -n $sockname
sockwrite -n $sockname %form
}
else { //echo -a sockerr }
}

on *:sockread:get.fb.login:{
sockread %temp
//echo -a %temp
}
Posted By: Riamus2 Re: connecting to facebook via socks - 22/03/08 12:07 PM
Change HTTP/1.1 to HTTP/1.0 and see if that helps. It's almost always best to use 1.0 for sockets.
Posted By: tparry Re: connecting to facebook via socks - 22/03/08 07:58 PM
Yeah I already tried changing to 1.0 before. No difference. Im not getting any output returned.
Posted By: hixxy Re: connecting to facebook via socks - 22/03/08 08:05 PM
This works fine for me.
Posted By: tparry Re: connecting to facebook via socks - 22/03/08 09:03 PM
Originally Posted By: hixxy
This works fine for me.


Hey thanks. That prompted me to try mIRC 6.21 and it works!
I got a popup about a certificate and I accepted it.

HTTP/1.1 302 Found
Date: Sat, 22 Mar 2008 21:01:51 GMT
Server: Apache/1.3.37.fb1
Location: http://www.facebook.com/common/browser.php
Keep-Alive: timeout=60, max=988
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html; charset=utf-8
0


Its redirecting to this url:
http://www.facebook.com/common/browser.php

So now the problem is its saying my browser is not supported. Any way around this?

You are using an incompatible web browser.

Sorry, we're not cool enough to support your browser. Please keep it real with one of the following browsers:

* Firefox
* Opera
* Safari
* Flock

Posted By: Bekar Re: connecting to facebook via socks - 22/03/08 09:53 PM
Fake a User-Agent string.
Posted By: Riamus2 Re: connecting to facebook via socks - 22/03/08 11:39 PM
Send this in your sockopen:

Quote:

User-agent: Opera/9.00 (Windows NT 4.0; U; en)
Posted By: tparry Re: connecting to facebook via socks - 23/03/08 07:24 AM
Great! Thanks works. Now I get past the browser check.
I seem to be having problems logging in though. I get the cookie, but I seem to end back at the login screen. Heres my code:

Code:
alias fb.login {
  sockclose fb.login
  unset %fb.cookie
  sockopen -e fb.login login.facebook.com 443
}
on *:sockopen:fb.login:{
  if (!$sockerr) {
    var %fb.login = $+(email=me@gmail.com,$chr(38),pass=mypass,$chr(38),persistent=1)
    //echo 4 -a %fb.login
    sockwrite -nt $sockname POST /login.php HTTP/1.1
    sockwrite -nt $sockname Host: login.facebook.com
    sockwrite -nt $sockname User-agent: Opera/9.00 (Windows NT 4.0; U; en)
    sockwrite -nt $sockname Content-Type: application/x-www-form-urlencoded
    sockwrite -nt $sockname Content-Length: $len(%fb.login)
;   sockwrite -nt $sockname Connection: Keep-Alive
    sockwrite -nt $sockname
    sockwrite -nt $sockname %fb.login
  }
  else { //echo -a sockerr }
}

on *:sockread:fb.login:{
  sockread %temp
  //echo -a Out: %temp
  if ($fb.cookie(%temp)) { tokenize 61 $v1 | hadd -m TB.hfs.cookie $1 $2 }
}

alias fb.cookie {
  var %r $regex($1-,/Set-Cookie:([^;]+)|$)/U)
  return $regml(1)
}


...and heres the output:

Code:
Out: HTTP/1.1 200 OK
Out: Date: Sun, 23 Mar 2008 07:17:11 GMT
Out: Server: Apache/1.3.37.fb1
Out: Expires: Mon, 26 Jul 1997 05:00:00 GMT
Out: Cache-Control: private, no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Out: Pragma: no-cache
Out: P3P: CP="HONK"
Out: Set-Cookie: datr=ab0b5084325b9c190859d42801e2666643843c16938855febdd0125ef7bc919c; expires=Tue, 22-Apr-2008 07:17:11 GMT; path=/; domain=.facebook.com; httponly
Out: Set-Cookie: test_cookie=1; path=/; domain=.facebook.com; httponly
Out: Set-Cookie: login=+; path=/; domain=.facebook.com; httponly
Out: Set-Cookie: login_x=me%40gmail.com; expires=Thu, 17-Jul-2008 01:03:51 GMT; path=/; domain=.facebook.com; httponly
Out: Set-Cookie: reg_fb_gate=https%3A%2F%2Flogin.facebook.com%2Flogin.php; path=/; domain=.facebook.com; httponly
Out: Set-Cookie: reg_fb_ref=https%3A%2F%2Flogin.facebook.com%2Flogin.php; path=/; domain=.facebook.com; httponly
Out: Transfer-Encoding: chunked
Out: Content-Type: text/html; charset=utf-8
Out:
Out: 1c4b
Out: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
Out: "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
Out: <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" id="facebook">
Out: <head>
Out: <title>Login | Facebook</title>
Out: <meta http-equiv="Content-type" content="text/html; charset=utf-8" />


I truncated the output. Some lines are too long, and its pretty much just the login/registration form.

Can anyone see why its not logging in? I can log in from firefox, so its not account problem.
Posted By: tparry Re: connecting to facebook via socks - 23/03/08 07:49 AM
If i include the Keep-Alive, I get this output. Should I be including it or not?

Code:
Out: HTTP/1.1 200 OK
Out: Date: Sun, 23 Mar 2008 07:46:43 GMT
Out: Server: Apache/1.3.37.fb1
Out: Expires: Mon, 26 Jul 1997 05:00:00 GMT
Out: Cache-Control: private, no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Out: Pragma: no-cache
Out: P3P: CP="HONK"
Out: Set-Cookie: datr=d7f44881e462c6d90042d7e6c53970fcf1702b31f55f7e2e5c829e735b113e91; expires=Tue, 22-Apr-2008 07:46:43 GMT; path=/; domain=.facebook.com; httponly
Out: Set-Cookie: test_cookie=1; path=/; domain=.facebook.com; httponly
Out: Set-Cookie: login=+; path=/; domain=.facebook.com; httponly
Out: Set-Cookie: login_x=me%40gmail.com; expires=Thu, 17-Jul-2008 01:33:23 GMT; path=/; domain=.facebook.com; httponly
Out: Set-Cookie: reg_fb_gate=https%3A%2F%2Flogin.facebook.com%2Flogin.php; path=/; domain=.facebook.com; httponly
Out: Set-Cookie: reg_fb_ref=https%3A%2F%2Flogin.facebook.com%2Flogin.php; path=/; domain=.facebook.com; httponly
Out: Keep-Alive: timeout=60, max=917
Out: Connection: Keep-Alive
Out: Transfer-Encoding: chunked
Out: Content-Type: text/html; charset=utf-8
Out: Set-Cookie: NSC_mphjo=445236773660;expires=Sun, 23-Mar-08 08:01:32 GMT;path=/
Out:
Out: 1c47
Out: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
Out: "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
Out: <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" id="facebook">
Out: <head>
Out: <title>Login | Facebook</title>
Out: <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
Posted By: argv0 Re: connecting to facebook via socks - 23/03/08 07:50 AM
you *did* log in, that was actually a response for a successful login right there.

as far as subsequent requests go, you need to use that cookie information and send it back to the browser with each request you make (the point of cookies). Yes, you must store and send back all of the data in those Set-Cookie headers... each one. If you don't, facebook has no way of tracking your previous request and can't detect that you are indeed logged in-- even though *you are*.
Posted By: tparry Re: connecting to facebook via socks - 23/03/08 08:45 AM
Originally Posted By: argv0
you *did* log in, that was actually a response for a successful login right there.

as far as subsequent requests go, you need to use that cookie information and send it back to the browser with each request you make (the point of cookies). Yes, you must store and send back all of the data in those Set-Cookie headers... each one. If you don't, facebook has no way of tracking your previous request and can't detect that you are indeed logged in-- even though *you are*.


Are you sure? Because normally when you login you're redirected to your home: http://www.facebook.com/home.php? and im not getting that data back.

Code:
alias get.hfs.recent {
  sockclose get.hfs.recent
  sockopen get.hfs.recent www.facebook.com 80
}

on *:sockopen:get.hfs.recent:{
  if (!$sockerr) {
    var %i 1
    while ($hget(TB.hfs.cookie,%i).item) { var %cookie %cookie $+($v1, =,$hget(TB.hfs.cookie,$v1),;) | inc %i }
    sockwrite -n $sockname GET /home.php? HTTP/1.1
    sockwrite -n $sockname Host: www.facebook.com
    sockwrite -n $sockname User-agent: Opera/9.00 (Windows NT 4.0; U; en)
    sockwrite -n $sockname Accept: */* 
    sockwrite -n $sockname Cookie: %cookie
    sockwrite -n $sockname
  }
  else { //echo -a sockerr }
}

on *:sockread:get.hfs.recent:{
  sockread %temp
  if (%temp != $NULL) {
    //echo -a OUT2: %temp
  }
}


...and the output:

Code:
OUT2: HTTP/1.1 302 Found
OUT2: Date: Sun, 23 Mar 2008 08:43:22 GMT
OUT2: Server: Apache/1.3.37.fb1
OUT2: Expires: Mon, 26 Jul 1997 05:00:00 GMT
OUT2: Cache-Control: private, no-store, no-cache, must-revalidate, post-check=0, pre-check=0
OUT2: Pragma: no-cache
OUT2: P3P: CP="HONK"
OUT2: Set-Cookie: next=http%3A%2F%2Fwww.facebook.com%2Fhome.php%3F; path=/; domain=.facebook.com; httponly
OUT2: Set-Cookie: next_path=%2Fhome.php%3F; path=/; domain=.facebook.com; httponly
OUT2: Set-Cookie: next=http%3A%2F%2Fwww.facebook.com%2Fhome.php%3F; path=/; domain=.facebook.com; httponly
OUT2: Set-Cookie: next_path=%2Fhome.php%3F; path=/; domain=.facebook.com; httponly
OUT2: Location: http://www.facebook.com/login.php
OUT2: Transfer-Encoding: chunked
OUT2: Content-Type: text/html; charset=utf-8
OUT2: 0
Posted By: Riamus2 Re: connecting to facebook via socks - 23/03/08 12:08 PM
You are probably not redirected there because you aren't sending the cookie information. Basically, you log in, then it goes to redirect you and doesn't have the cookie information, so sends you back to the login screen.

And don't forget that 1.0 will be easier to work with later than 1.1.
Posted By: tparry Re: connecting to facebook via socks - 23/03/08 01:26 PM
Well after I login, I run "get.hfs.recent" (see my last reply) and im sending the cookie info. The output from that is redirecting me to the login screen. Which makes me believe it didnt login properly.
Posted By: tparry Re: connecting to facebook via socks - 23/03/08 02:57 PM
I got it working now.
The only problem im left with is dealing with long strings.
How can I manipulate the html data when I get lines that are 1000+ characters long?

* /echo: line too long (line 28, script1.mrc)
Posted By: Thrull Re: connecting to facebook via socks - 23/03/08 09:13 PM
I think the only solution is to use binary data, but as I don't do that very often I really can't offer much help with it. Sorry.
Posted By: argv0 Re: connecting to facebook via socks - 23/03/08 09:45 PM
As mentioned above you need to store the data in files or binary variables. /bset or /fopen would be good /help topics to look at
Posted By: tparry Re: connecting to facebook via socks - 24/03/08 02:28 AM
Originally Posted By: argv0
As mentioned above you need to store the data in files or binary variables. /bset or /fopen would be good /help topics to look at


Ok, so I guess I have no choice but to store it directly to a file. I presume like this:

on *:sockread:test:{ sockread -n &test | bwrite thetest.txt -1 -1 &test }

Since you cant manipulate binary variables, I guess my only choice is to read in the file and manipulate the data.

So do I have to use /fopen and $fread to handle files with really long lines? Is it the only way? The html code im trying to filter only has 200+ lines, but a few of the lines are over 65,000 characters long!

I need to go through the 65,000+ line and filter everything between the text:

<div class="results" (everything in here up to) </table></div>
The data inside is over 2,000 characters, so I'm not sure how im expected to use mIRC to pattern match that.

Is there an easy way to do that? Argh mIRC is so limited smirk
Posted By: argv0 Re: connecting to facebook via socks - 24/03/08 03:05 AM
well, mIRC's script language is built for IRC which has only a ~500 character limit... so what would you even do with more than that much data (in theory)?

The question is, do you really need to grab that much data at a time? most likely, you're only going to need about ~100 bytes of data at a time-- especially if youre planning on sending this over IRC ..

So, with that in mind, you can easily craft matches that return small amounts of data from the complete output

Though, if it were me, I'd just be using Ruby4mIRC, Tcl4mIRC or Python4mIRC to do the work. mIRC really isn't meant for sifting through large amounts of data.
Posted By: tparry Re: connecting to facebook via socks - 24/03/08 04:24 AM
Correct, I only need small amounts of data which I will store in a hash table.
From the 66,000+ char line, I need to loop through 20 similar sections which contains about 3000 chars each, containing things like name, price, link, img. 95% of the data is just html that I need to discard.

Is it easy to do this in regular mIRC? Otherwise i'll have to get messy and call a perl script or something. I was hoping to keep it tidy and have it all done within mIRC.

I started writing a script (using fopen/fseek/$fread) which seeks through the long lines in sections of 200 bytes, but the problem is sometimes the data falls either side of the 200 byte chunks. Rather messy. smirk
Posted By: argv0 Re: connecting to facebook via socks - 24/03/08 06:17 AM
how do you know you cant get at the data in first pass as it comes in from the sockread?

all you'd need to do would be apply a regex to the incoming data

Code:
sockread %temp
if ($regex(%temp,/<p class="username">(.+?)</p>/)) {
  echo -a username is $regml(1)
}


While it's not exactly the most robust solution, this approach works 95% of the time because there is usually some unique data string you can search for surrounding every piece of data you need to extract.
Posted By: tparry Re: connecting to facebook via socks - 24/03/08 09:51 AM
Due to the complexity of the html code (20 chunks of data in 60,000 chars), I decided to use a simple perl script to extract the data. It works like a charm, but i'd still prefer to keep everything in mIRC. Too bad mIRC has so many variable limitations. No idea why!

I guess I should learn how to do all the socket programing in perl, then it wont be such a mess.
Posted By: tparry Re: connecting to facebook via socks - 24/03/08 09:59 AM
Theres 20 chunks of this code in 1 line of the html code.
Does this look like something easy to manipulate in mIRC? I need only 7 fields from each chunk, but they arent easy to match:

<div class="results" style="width: 395px;"><table><tr><td class="sImage"><a href="profile.php?id=825603469" onclick="(new Image()).src = &#039;/ajax/ct.php?app_id=7906852977&action_type=3&post_form_id=170baa3572aa7ee38b8b9f6fa0f04676&position=3&&#039; + Math.random();return true"><img size="s" uid="825603469" linked="no" src="http://profile.ak.facebook.com/profile5/473/88/s825603469_7283.jpg" alt="Sarah Bockus" title="Sarah Bockus" /></a></td><td class="sInfo"><font class="bigger" style="line-height: 16px;"><b><a href="profile.php?id=825603469" onclick="(new Image()).src = &#039;/ajax/ct.php?app_id=7906852977&action_type=3&post_form_id=170baa3572aa7ee38b8b9f6fa0f04676&position=3&&#039; + Math.random();return true">Sarah Bockus</a></b></font>
<div class="blurb">&#34;:)"I will fight to the end...lol&#34;</div><table style="line-height: 16px; margin-top: 3px; color: #898989;"><tr><td width="40px">Price:</td><td><b style="color: #006600;">$23,378</b></td></tr><tr><td>Bling:</td><td><b style="color: #006600;">$52,606</b></td></tr><td>Hotties:</td><td><font style="color: red;">12</font></td></table></td><td class="actions" style="width: 145px;"><div class="navLink"><a class="submenu" clicktoshowdialog="my_dialog" onclick="FBML.clickToShowDialog("app7906852977_my_dialog");fbjs_sandbox.instances.a7906852977.bootstrap();return fbjs_dom.eventHandler.call([fbjs_dom.get_instance(this,7906852977),function(a7906852977_event) {a7906852977_getFavor(825603469);},7906852977],new fbjs_event(event));return false"><div class="nav">Add to Favorites</div></a></div><div class="navLink"><a class="submenu" clicktoshowdialog="my_dialog" onclick="FBML.clickToShowDialog("app7906852977_my_dialog");fbjs_sandbox.instances.a7906852977.bootstrap();return fbjs_dom.eventHandler.call([fbjs_dom.get_instance(this,7906852977),function(a7906852977_event) {a7906852977_getPoke(825603469);},7906852977],new fbjs_event(event));return false"><div class="nav">Poke Sarah!</div></a></div><div class="navLink"><a class="submenu" href="gifts.php?id=825603469" onclick="(new Image()).src = &#039;/ajax/ct.php?app_id=7906852977&action_type=3&post_form_id=170baa3572aa7ee38b8b9f6fa0f04676&position=3&&#039; + Math.random();return true"><div class="nav">Give a Present</div></a></div><div class="navLink"><a class="submenu" clicktoshowdialog="my_dialog" onclick="FBML.clickToShowDialog("app7906852977_my_dialog");fbjs_sandbox.instances.a7906852977.bootstrap();return fbjs_dom.eventHandler.call([fbjs_dom.get_instance(this,7906852977),function(a7906852977_event) {a7906852977_getInfo(825603469);},7906852977],new fbjs_event(event));return false"><div class="nav">Buy for <b style="color: #006600;">$26,728</b></div></a></div></td></tr></table></div></b></div></a></div></td></tr></table></div>
Posted By: hixxy Re: connecting to facebook via socks - 24/03/08 01:12 PM
I've copied and pasted that chunk of text into a file and then read it into a binvar to make this code, but it should work no matter how you fill the variable with some small modifications.

Code:
alias parseprofile {
  bread test.txt 0 $file(test.txt) &data
  var %pointer = $bfind(&data,1,profile.php?id=), %profile, %profileimage, %profiletitle, %profileprice, %profilebling, %profilehotties, %profilebuyfor
  while (%pointer) {
    if ($bfind(&data,%pointer,")) { 
      %profile = $bvar(&data,$+(%pointer,-,$calc($v1 - 1))).text
      %pointer = $v1 + 1
    }
    %pointer = $bfind(&data,%pointer,src="http://profile.) + 5
    if ($bfind(&data,%pointer,")) {
      %profileimage = $bvar(&data,$+(%pointer,-,$calc($v1 - 1))).text
      %pointer = $v1
    }
    %pointer = $bfind(&data,%pointer,title=") + 7
    if ($bfind(&data,%pointer,")) {
      %profiletitle = $bvar(&data,$+(%pointer,-,$calc($v1 - 1))).text
      %pointer = $v1
    }
    %pointer = $bfind(&data,%pointer,Price:)
    %pointer = $bfind(&data,%pointer,$)
    if ($bfind(&data,%pointer,<)) {
      %profileprice = $bvar(&data,$+(%pointer,-,$calc($v1 - 1))).text
      %pointer = $v1
    }
    %pointer = $bfind(&data,%pointer,Bling:)
    %pointer = $bfind(&data,%pointer,$)
    if ($bfind(&data,%pointer,<)) {
      %profilebling = $bvar(&data,$+(%pointer,-,$calc($v1 - 1))).text
      %pointer = $v1
    }
    %pointer = $bfind(&data,%pointer,Hotties:)
    %pointer = $bfind(&data,%pointer,red;">) + 6
    if ($bfind(&data,%pointer,<)) {
      %profilehotties = $bvar(&data,$+(%pointer,-,$calc($v1 - 1))).text
      %pointer = $v1
    }
    %pointer = $bfind(&data,%pointer,Buy for)
    %pointer = $bfind(&data,%pointer,$)
    if ($bfind(&data,%pointer,<)) {
      %profilebuyfor = $bvar(&data,$+(%pointer,-,$calc($v1 - 1))).text
      %pointer = $v1
    }
    echo -a * Profile: %profile
    echo -a * Profile image: %profileimage
    echo -a * Profile title: %profiletitle
    echo -a * Profile price: %profileprice
    echo -a * Profile bling: %profilebling
    echo -a * Profile hotties: %profilehotties
    echo -a * Profile buy for: %profilebuyfor
    %pointer = $bfind(&data,%pointer,profile.php?id=)
  }
}


Of course you can do whatever you want with the variables.
Posted By: tparry Re: connecting to facebook via socks - 24/03/08 02:32 PM
Oh wow it works, im quite impressed!
The only thing is, I got 19/20 results outputed.
This is because sometimes a profile is private and theres no name included. So this is missing from the code:

alt="name here" title="name here"

Also, the url for those without a title is http://static. and not http://profile.

Still trying to figure out how to fix that.
Posted By: hixxy Re: connecting to facebook via socks - 24/03/08 02:36 PM
If you paste the chunk for a private profile I can take a look.
Posted By: tparry Re: connecting to facebook via socks - 24/03/08 02:52 PM
I got it working, thanks! laugh

Code:
alias parseprofile {
  bread hfs.recent.txt 0 $file(hfs.recent.txt) &data
  var %pointer = $bfind(&data,1,profile.php?id=)
  while (%pointer) {
    var %profile, %profileimage, %profiletitle, %profileprice, %profilebling, %profilehotties, %profilebuyfor
    if ($bfind(&data,%pointer,")) { 
      %profile = $bvar(&data,$+(%pointer,-,$calc($v1 - 1))).text
      %pointer = $v1 + 1
      %pointer = $bfind(&data,%pointer,src="http://) + 5
      if ($bfind(&data,%pointer,")) {
        %profileimage = $bvar(&data,$+(%pointer,-,$calc($v1 - 1))).text
        %pointer = $v1
        if (http://profile isin %profileimage) {
          %pointer = $bfind(&data,%pointer,title=") + 7
          if ($bfind(&data,%pointer,")) {
            %profiletitle = $bvar(&data,$+(%pointer,-,$calc($v1 - 1))).text
            %pointer = $v1
          }
        }
        else { %profiletitle = "PRIVATE" }
        %pointer = $bfind(&data,%pointer,Price:)
        %pointer = $bfind(&data,%pointer,$)
        if ($bfind(&data,%pointer,<)) {
          %profileprice = $bvar(&data,$+(%pointer,-,$calc($v1 - 1))).text
          %pointer = $v1
          %pointer = $bfind(&data,%pointer,Bling:)
          %pointer = $bfind(&data,%pointer,$)
          if ($bfind(&data,%pointer,<)) {
            %profilebling = $bvar(&data,$+(%pointer,-,$calc($v1 - 1))).text
            %pointer = $v1
            %pointer = $bfind(&data,%pointer,Hotties:)
            %pointer = $bfind(&data,%pointer,red;">) + 6
            if ($bfind(&data,%pointer,<)) {
              %profilehotties = $bvar(&data,$+(%pointer,-,$calc($v1 - 1))).text
              %pointer = $v1
              %pointer = $bfind(&data,%pointer,Buy for)
              %pointer = $bfind(&data,%pointer,$)
              if ($bfind(&data,%pointer,<)) {
                %profilebuyfor = $bvar(&data,$+(%pointer,-,$calc($v1 - 1))).text
                %pointer = $v1
                echo -a * Profile: %profile
                echo -a * Profile image: %profileimage
                echo -a * Profile title: %profiletitle
                echo -a * Profile price: %profileprice
                echo -a * Profile bling: %profilebling
                echo -a * Profile hotties: %profilehotties
                echo -a * Profile buy for: %profilebuyfor
              }
            }
          }
        }
      }
    }
    %pointer = $bfind(&data,%pointer,profile.php?id=)
  }
Posted By: argv0 Re: connecting to facebook via socks - 24/03/08 09:57 PM
whats wrong with just matching the first href="" for the profile link, first title="" for the name, etc..?

Posted By: hixxy Re: connecting to facebook via socks - 24/03/08 10:30 PM
He said there's 20 of those chunks in one line of html. Matching the first result would ignore the other 19 profiles.
Posted By: Riamus2 Re: connecting to facebook via socks - 24/03/08 10:58 PM
If the lines are too long, then you need binary variables. That said, you *can* manipulate binary variables within mIRC without writing them to a file. Using $bvar allows you to do this. If you check each line for your matchtext, you may not even need to actually work with lines over the ~500 character limit. If that is the case, it won't be very difficult at all to handle the data. If you give a *small* sample of the data that you're actually trying to grab from the site, it would be easy to show you how to match it and use it.
Posted By: tparry Re: connecting to facebook via socks - 25/03/08 01:38 AM
Originally Posted By: Riamus2
If the lines are too long, then you need binary variables. That said, you *can* manipulate binary variables within mIRC without writing them to a file. Using $bvar allows you to do this. If you check each line for your matchtext, you may not even need to actually work with lines over the ~500 character limit. If that is the case, it won't be very difficult at all to handle the data. If you give a *small* sample of the data that you're actually trying to grab from the site, it would be easy to show you how to match it and use it.


I posted a sample of 1 chunk a few replies ago. You can copy/paste that 20 times on the same line to replicate the data I receive from the webpage.
Much appreciated smile
Posted By: Riamus2 Re: connecting to facebook via socks - 25/03/08 02:46 AM
Sorry, ignore my reply. I didn't notice the second page and replied to the post at the end of the first page.
© mIRC Discussion Forums