Php 带感叹号的卷曲+;目标URL中的hasthag

Php 带感叹号的卷曲+;目标URL中的hasthag,php,curl,ssh,nginx,Php,Curl,Ssh,Nginx,我正在尝试在目标url中使用一个标签进行一个简单的卷曲,但会出现错误 我知道这个脚本很有效,我以前用过很多次 <?php error_reporting(E_ALL); $curl = curl_init('http://tools.pingdom.com/fpt/#!/d3YvU8/http://www.nginx-hosting.co.uk'); curl_setopt($curl, CURLOPT_FAILONERROR, true); curl_setopt($curl, CU

我正在尝试在目标url中使用一个标签进行一个简单的卷曲,但会出现错误

我知道这个脚本很有效,我以前用过很多次

<?php

error_reporting(E_ALL);

$curl = curl_init('http://tools.pingdom.com/fpt/#!/d3YvU8/http://www.nginx-hosting.co.uk');
curl_setopt($curl, CURLOPT_FAILONERROR, true);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);  
$result = curl_exec($curl);

if ($result == ("")) {
echo ("Nothing to curl");
}
else {
echo $result;
}

?> 
但是得到这个错误消息-bash:/d3YvU8/http:未找到事件

我假设这是因为目标url中有一个感叹号或一个标签


有人能给我指一下正确的方向吗。提前谢谢

我刚刚试过你的脚本,效果很好,关于
-bash:/d3YvU8/http:event not found
error您应该使用如下引号:curl'

FYI
#
被称为。可能是的重复。我不介意,但我尝试了双引号,并遇到了相同的问题。我甚至没有想到单引号。卷曲的结果并不像预期的那样,它的输出与直接访问url不同。因为是javascript在shebang之后处理所有事情,所以你需要类似于使用js支持打开url的东西。我刚刚读了一篇类似的帖子,答案是phantonjs.org。我将检查一下。然后,刚刚安装了phantomjs,现在遇到了这个问题。在SSH中工作正常,但在PHP中不起作用。我应该打开一个新的问题来解决和引用这个问题吗?什么是php不起作用?你是如何使用php的?
curl http://tools.pingdom.com/fpt/#!/d3YvU8/http://www.nginx-hosting.co.uk