İşte kod:
<?
// Getting the comic page
if (!empty($_GET['c'])) $id = $_GET['c'];
else $id = "new";
$url = "http://www.explosm.net/comics/$id/";
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_FAILONERROR, 1);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($curl, CURLOPT_RETURNTRANSFER,1);
curl_setopt($curl, CURLOPT_TIMEOUT, 3);
curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.2 (KHTML, like Gecko) Chrome/6.0.447.0 Safari/534.2");
$result = curl_exec($curl);
curl_close($curl);
?>
(Aslında daha uzun, ama ben sorun var parçası)
Yani, sorun budur: (örneğin "2126" gibi) GET argüman "c" kayışının kimliğini belirtirseniz, her şey tamam çalışır ve şeridin sayfası $ sonuç var yüklenir alır.
However, if I specify a term, such as "random" or "new" (both of these work fine on explosm website, you can check that if you want), $result just equals to nothing.
To test that, you can use this page: http://expmo.1free.ws/test.php
( http://expmo.1free.ws/test.php?c=2126
works ok, but http://expmo.1free.ws/test.php
and http://expmo.1free.ws/test.php?c=random
doesn't)
Bana yardımcı olabilir misiniz? Teşekkür ederim.