Re: How to call external php script from html? [message #172993 is a reply to message #172992] |
Tue, 15 March 2011 11:24 |
Erwin Moller
Messages: 228 Registered: September 2010
Karma:
|
Senior Member |
|
|
On 3/15/2011 12:14 PM, astral wrote:
> "Erwin Moller" wrote:
>
>>> Hi,
>
>>> it's not working also.
>
>
>> It is working. It is an ancient trick.
>
>> Add an alert to it so see what page is called.
>> You DID change http://www.example.org/myScript.php into something
>> sensible I presume??
>
>
>> <script type="text/javascript">
>> var myPHPScript = "http://www.example.org/myScript.php";
>> var milliSecSinceUE = (new Date()).getTime();
>> var myFakeImage = new Image();
>> alert (myPHPScript +"?nocache="+milliSecSinceUE);
>> myFakeImage.src = myPHPScript +"?nocache="+milliSecSinceUE;
>> </script>
>
>
>> Regards,
>> Erwin Moller
> .............................
>
>
> Hi,
>
> sure, I used correct path in my test.
> Alert says http://www.site.com/test.php?nocache=1300186777680
>
> so it called script URL.
Hi Astral,
Then what exactly isn't working?
(Assuming you are using Apache, and know where your accesslog is and
have sufficient rights) you can check in your accesslogs if the script
is called with something like:
tail -n 100 access_log | grep test.php
to see if the request arrived.
Regards,
Erwin Moller
>
> Regards,
> astral
--
"That which can be asserted without evidence, can be dismissed without
evidence."
-- Christopher Hitchens
|
|
|