Page 1 of 1

Convert JS for PHP

Posted: Sun Dec 25, 2011 5:28 pm
by thiagoafc
I have the following code in javascript, I would like to rewrite it in PHP, if someone can help thank you very much.

my code: http://pastebin.com/Jnt8RiYj

Re: Convert JS for PHP

Posted: Wed Dec 28, 2011 2:14 am
by twinedev
You have things like document.getElementsByTagName("A")

PHP cannot interact with what is displayed in a web browser directly, so you would have to specify more on what this needs to do. Will PHP be outputting the page and you need this functionality to work to change what would actually get sent out, or would you need it to read another site and do the changes to the source of that page?

The more details you can give, the more help you can get.

-Greg