Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Linux, Apache, MySQL, PHP
  4. copy web page

copy web page

Scheduled Pinned Locked Moved Linux, Apache, MySQL, PHP
phptutorialquestion
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    udch
    wrote on last edited by
    #1

    How to copy web page using php? I tried this But it is not working. Any Idea how to do this ?

    G 1 Reply Last reply
    0
    • U udch

      How to copy web page using php? I tried this But it is not working. Any Idea how to do this ?

      G Offline
      G Offline
      Graham Breach
      wrote on last edited by
      #2

      It works for me. Check that the allow_url_fopen option is enabled and that you have permission to write to the output file. Manual page.[^] It's also possible that the server you're running it on is firewalled to prevent it accessing the remote address, so I would check that you can get to it from the server using something like lynx.

      U 1 Reply Last reply
      0
      • G Graham Breach

        It works for me. Check that the allow_url_fopen option is enabled and that you have permission to write to the output file. Manual page.[^] It's also possible that the server you're running it on is firewalled to prevent it accessing the remote address, so I would check that you can get to it from the server using something like lynx.

        U Offline
        U Offline
        udch
        wrote on last edited by
        #3

        Thanks for your help. it is working code but I am trying to copy all data. Open this link "http://nseindia.com/marketinfo/companyinfo/companysearch.jsp?cons=mll§ion=7" in your browser and then match the data with example.txt after that you can understand what i want to say.My question is how can i copy all data using php ? Thanks in advance.

        G 1 Reply Last reply
        0
        • U udch

          Thanks for your help. it is working code but I am trying to copy all data. Open this link "http://nseindia.com/marketinfo/companyinfo/companysearch.jsp?cons=mll§ion=7" in your browser and then match the data with example.txt after that you can understand what i want to say.My question is how can i copy all data using php ? Thanks in advance.

          G Offline
          G Offline
          Graham Breach
          wrote on last edited by
          #4

          I get exactly the same content if I save out the page as when I run the PHP script - a page with empty tables. I see what the problem is though - the data is loaded using Javascript, so isn't present in the page at all. If all you want is the data, I'd recommend finding out how it gets pulled onto the browser and reading that instead.

          U 1 Reply Last reply
          0
          • G Graham Breach

            I get exactly the same content if I save out the page as when I run the PHP script - a page with empty tables. I see what the problem is though - the data is loaded using Javascript, so isn't present in the page at all. If all you want is the data, I'd recommend finding out how it gets pulled onto the browser and reading that instead.

            U Offline
            U Offline
            udch
            wrote on last edited by
            #5

            Thanks for your help brother. I think i can't write code because i don't know programing very well.Do you know some one who can write this code for me and how much it will cost me ? Thanks in advance.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups