so that's a weird thing i'm working on. some of you already helped me with this script:
proxy.php
<?php
if( isset( $_GET['url'] ) ) {
# Get the Referred URL
$raw = file_get_contents( $_GET['url'] );
# RegExp to Strip All Script tags and/or links with Javascript in them.
$safe = preg_replace( '/<script[^>]*>.*<\/script>|[\"\']javascript:.*[\"\']/im' , '' , $raw );
echo $safe;
} else {
echo 'No URL Set';
}
it's a proxy which lets me use the jquery load method with proxy.php?url=http%3A//www.somedomain.com/
that works perfectly. i wonder now if i can pass along ANOTHER query string in that url which http://www.somedomain.com can $_GET from the url?
I think that might me hard to understand what i'm after.
i wonder if it's somehow possible to do that:
proxy.php?url=http%3A//www.somedomain.com&query=anewquerywhichsomedomaincanread
if i set another ? as query it ends in a 404 because i can't set two ? in an url.
proxy.php?url=http%3A//www.somedomain.com?query=anewquerywhichsomedomaincanread
so i wonder if theres a trick in doing that so somedomain.com can use the $_GET method to get the second query string from the url. I can't use an & because:
this -> proxy.php?url=http%3A//www.somedomain.com&query=anewquerywhichsomedomaincanread
would actually look like this -> http://www.somedomain.com&query=anewquerywhichsomedomaincanread
for somedomain.com.
do you get me? any ideas?