Extra Html Codes Using PHP/VB

Discussion in 'PHP' started by thankyou, Aug 20, 2008.

  1. #1
    Hi everyone,

    I need help in extracting html codes from websites.
    There are some program that can extract captchas from websites. Some directories submitter software has it.

    Let me give an example for a better picture.
    let's say I want to extract form codes from a page.
    So I want this program/script to extract the whole codes from
    <form.... until ...</form>

    How do I do that? If possible I want to make it in php script.
    Let me know how to do it on vb too. :) (optional)

    I am not buying anything, but I just want to create this script.
     
    thankyou, Aug 20, 2008 IP
  2. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #2
    
    preg_match('~<form(.*?)</form>~si', $html, $match);
    
    echo $match[0];
    
    PHP:
     
    nico_swd, Aug 21, 2008 IP