Em Andamento

2 regular expressions in PHP (10-minutes-job)

Often a javascript is checking if the website's source was requested from the origin domain or if it is running on another website (like through a proxy) or local. If so, this script is forwarding the browser to the original website. Such a code may look like this:

if ( [url removed, login to view] != "[[url removed, login to view]][1]" ) { [url removed, login to view] = "<[url removed, login to view]>"; }

I am reading source codes and deliver them through a php proxy so I want to deactivate such scripts. So the regular expression I need should find such patterns and replace them into

2 == 1

so this requirement will never exist. So the example script should be changed to

if ( 1 == 2 ) { [url removed, login to view] = "<[url removed, login to view]>"; }

Please make sure that your regular expression is flexible enough to find most of the possible ways such script term could look like. Here are some examples:

[url removed, login to view] != "[[url removed, login to view]][1]"

[url removed, login to view] != "[[url removed, login to view]][1]"

[url removed, login to view] != "[[url removed, login to view]][1]"

[url removed, login to view] != "[url removed, login to view]"

"[[url removed, login to view]][1]" != [url removed, login to view]

(find the second need regular expression down on this website; here the space was too small)

## Deliverables

The second regular expression is similar. It should find and replace such script patterns that should detect if a website is running in an frame. Here I also want to deactive then.

Example:

if (top != self )

should be found and changed to

if (1 == 2)

Again here some possible writings of that term:

top != self

self !=top

[url removed, login to view] !=[url removed, login to view]

top!=[url removed, login to view]

Thank you!

Habilidades: PHP

Ver mais: website source code php, job window, second job, regular expressions examples, regular expressions example, regular expression codes, regular expression code, local writings, job examples, examples regular expressions, examples regular expression, example regular expressions, example regular expression, domain forwarding, regular expression example, top job, regular, php proxy, job location, expressions, browser detect, php expression, regular expressions javascript, php small codes, php browser detect

Acerca do Empregador:
( 180 comentários ) London, United Kingdom

ID do Projeto: #3059409

Premiar a:

gsmsl

See private message.

$12 USD em 1 dia
(13 Avaliações)
2.3