AJAX ve vekil: Başka bir sorgu ile yabancı bir web sitesi yükleme?

0 Cevap php

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';
}

bana proxy.php?url=http%3A//www.somedomain.com/ ile jquery yük yöntemi kullanmanızı sağlayan bir vekil var

O mükemmel çalışır. i url http://www.somedomain.com olabilir $ _GET bu url BAŞKA sorgu dizesi iletmekten eğer ben şimdi merak ediyorum?

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.

Beni alabilirim? herhangi bir fikir?

0 Cevap