I want to extract the variable of a hidden variable from a website like facebook.com. How can i do this using cURL.
Thanks
I want to extract the variable of a hidden variable from a website like facebook.com. How can i do this using cURL.
Thanks
PLEASE see the first answer to this question. You should NEVER try to use Regex to parse HTML. It doesn't work. Use the PHP Document Object Model to parse the document instead: see this question.
phpQuery is a great tool for what you want to do, and it essentially provides you with the familiar jQuery API within PHP (CSS selectors, etc.)
Regular expression:
/<input.+?type=['"]?hidden['"]?.+?value=['"]?(.+?)['"]?/si
I don't know how to make this regexp not depending place of value.