Door
Willem
op 05-05-2005 15:44
gewijzigd op 05-05-2005 15:47
1.349 views
Hallo! Ik probeer de grootte van een avatar te controleren maar dat werkt niet. Als ik bijvoorbeeld getimagesize("http://www.site.nl/img.jpg") doe krijg ik een error. Maar getimagesize("img.jpg") werkt wel.
Het probleem is dat de avatars op een andere server staan. Weet iemand hoe je de groote van een avatar kan achterhalen terwijl die op een andere server staat?
Alvast bedankt!!!
edit
de foutmelding: Warning: getimagesize(http://www.site.nl/img.jpg): failed to open stream: HTTP request failed! HTTP/1.1 401 Authorization Required in...
?
Onbekende gebruiker
06-05-2005 17:09
401 Unauthorized
The request requires user authentication. The response MUST include a WWW-Authenticate header field (section 14.47) containing a challenge applicable to the requested resource. The client MAY repeat the request with a suitable Authorization header field (section 14.8). If the request already included Authorization credentials, then the 401 response indicates that authorization has been refused for those credentials. If the 401 response contains the same challenge as the prior response, and the user agent has already attempted authentication at least once, then the user SHOULD be presented the entity that was given in the response, since that entity might include relevant diagnostic information. HTTP access authentication is explained in "HTTP Authentication: Basic and Digest Access Authentication"
Oke, maar ik kan niet bij php.ini dus dat valt af... Is er een alternatief? Of moet ik de plaatjes uploaden naar mijn eigen server waar ik bijvoorbeeld ../avatars/ kan gebruiken zodat het wel werkt?
Of moet ik de plaatjes uploaden naar mijn eigen server waar ik bijvoorbeeld ../avatars/ kan gebruiken zodat het wel werkt?
Daar lijkt het wel op :/
Maar dat kan vast wel met fsockopen (ik kan alles met fsockopen ^^,) maar dan moet dat wel werken op je server (wordt vaak, te vaak om beveiligingsredenen uitgezet). Dan zou je een plaatje kunnen kopieren naar je eigen server daarmee, uiteraard volledig automatisch.