• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: URL Access Scripting
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: URL Access Scripting


  • Subject: Re: URL Access Scripting
  • From: Doug McNutt <email@hidden>
  • Date: Tue, 23 Jul 2002 16:16:25 -0600

At 16:12 -0500 7/23/02, ken wrote:
>Is there some way to just load it into a variable in memory instead of writing it to a file first?

Nope.

Well. . . I haven't found one and other attempts to read a typical html file directly into a script fail miserably when the size is more than a few kB. Read with delimiter or until delimiter from a temporary file is an option. System wide disk caching should - one hopes - save time by not actually writing to the disk.

MacPerl, or perl itself in OS neXt, is the answer and it will work when you move your cgi to a major server.

use LWP::Simple; # set up to use LWP lib for get(URL)
$theURL = "http://. . . . ..html;
$content = get($theURL);
if(not defined($content))
{
print "Unable to get $theURL\n";
last;
}
$size = length($content); # Can be over a megabyte without problems.


--

Applescript syntax is like English spelling:
Roughly, but not thoroughly, thought through.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >URL Access Scripting (From: "ken " <email@hidden>)

  • Prev by Date: URL Access Scripting
  • Next by Date: Re: Need script editor...??
  • Previous by thread: URL Access Scripting
  • Next by thread: Re: URL Access Scripting
  • Index(es):
    • Date
    • Thread