Hello Steve,
You have encountered a bug that will be fixed with the next version of
the Genome Browser CGIs, which we expect to release early next week. In
the meantime, the bug is caused by making a http request to hgTracks
without specifying a User-Agent header, so, if you set the user agent in
your program, e.g.:
curl_setopt($ch, CURLOPT_USERAGENT, "curl");
you should be able to get the requested page.
I hope this helps, and sorry for the inconvenience!
--
Brooke Rhead
UCSC Genome Bioinformatics Group
On 07/10/09 08:35, Steve Lefever wrote:
> Hi,
>
> Using a PHP script (containing cURL) I used to upload a BED file to
> the genome browser and extract the graph generated from it. Uploading
> the BED file still works, but recently I'm unable to retrieve the page
> containing the graph (I'm talking about this page :
> http://genome.ucsc.edu/cgi-bin/hgTracks?hgsid=136545595&clade=mammal&org=Human&db=hg18&position=chr21%3A46%2C226%2C739-46%2C227%2C098&pix=620&Submit=submit).
> To retrieve this page, I used the following PHP code
> :
>
> <?php
> $channel2 = curl_init("http://genome.ucsc.edu/cgi-bin
> /hgTracks?hgsid=136544735&
> Submit=go+to+genome+browser&
> position=chr21%3A46226739-46227098");
> curl_setopt($channel2,CURLOPT_HTTPGET,true);
> curl_setopt($channel2,CURLOPT_RETURNTRANSFER,true);
> $webpage = curl_exec($channel2);
> ?>
>
> When I execute this code now, I get a blank page only containing the
> number '1'. Has something been changed to this page which is
> preventing me from retrieving it? If so could you help me to solve
> this problem so I can retrieve the page (and the graph it contains)
> again?
>
> Thanking you in advance,
>
> Steve Lefever
> Center for Medical Genetics Ghent (CMGG)
> Ghent University Hospital
> Medical Research Building (MRB), 2nd floor, room 120.055
> De Pintelaan 185, B-9000 Ghent, Belgium
>
>
>
>
>
>
> _______________________________________________
> Genome maillist - [email protected]
> https://lists.soe.ucsc.edu/mailman/listinfo/genome
_______________________________________________
Genome maillist - [email protected]
https://lists.soe.ucsc.edu/mailman/listinfo/genome