dcsimg


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Read source code from a page and get strings from it

  1. #1
    Join Date
    Sep 2005
    Location
    Paris France
    Posts
    1

    Question Read source code from a page and get strings from it

    Hya,

    Great newbie Here.

    I can use php to find a pattern from a string.
    I want this string to be the source code of an HTML page on which I have no control (it does not belong to me).
    This because the HTML page shows me text, but behind there are informations .... not really hidden ... just in the code.

    How to get the source code ?

    Javascript ? Java ?

    I intend to use php just after, to treat the found data, but of course if you suggest I remain in javascript to treat the strings ...
    Errare Humanum Est ... Sed Perseverare Diabolicum
    Torquemada, Great Inquisitor

  2. #2
    Join Date
    Jul 2005
    Posts
    9
    You could do it all in PHP, no JS necessary.

    You can use the fopen and other filesystem functions. It can open URLs and grab the contents of it.

    You can also look into CURL. I've never used it, but it looks like it might be tailored for this sort of thing. (Although, I've used the built-in filesystem functions to do exactly what you're trying to do.)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center