0

good day everyone!

i am trying to append a script to a remote page (not mine and it is a form page) that would hide some of its content (some in particular) before showing it. i am using curl but the only thing i could do is retrieve its html code.

is there anyway of doing what i wanted to happen?

2 Answers 2

1

I'm assuming that the user asks your server for content, and your server needs to fetch that content on another server and process it before sending it back to the user.

Query the other script using CURL, then run your script on that HTML to remove the pieces that you don't want to keep (I hope for your sake that they are reasonably easy to find and eliminate), and finally output the resulting HTML to the user.

Sign up to request clarification or add additional context in comments.

Comments

0

To remove some part of the html, you could preg_replace() it using regular expressions.

Googling for an online regexp might be of some help, if you have no experience with regular expressions.

1 Comment

it will if you load the page with CURL first

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.