Registreer FAQ Berichten van vandaag


Ga terug   Scholieren.com forum / Technologie / Software & Hardware
Reageren
 
Topictools Zoek in deze topic
Oud 06-05-2004, 11:33
Dr HenDre
Avatar van Dr HenDre
Dr HenDre is offline
Ik heb op mn gratis lycos account een script draaien voor iemand(wat ik overigens zelf heb gemaakt ) maar nu opent het script met fopen een url. Op mn localhost doet ie dat wel, maar op lycos niet omdat allow_url_fopen uit staat.

Nu is mijn vraag, is er een alternatief hiervoor, zodat ik toch een extern bestand in kan lezen.

En ow ja, corn jobs is ook geen optie

het gaat om de volgende stuk code
PHP-code:
$program "http://www.eter.tv/arm/programs/print_version/a_Atvsput.shtml"
$content =  file_get_contents($program);
?> 
de instellingen van php/apache staan op http://members.lycos.nl/hendre/phpinfo.php
Met citaat reageren
Advertentie
Oud 06-05-2004, 11:41
Verwijderd
Op http://php.net/file_get_contents kun je lezen waarom het niet werkt..

Maar gebruik fopen
Met citaat reageren
Oud 06-05-2004, 11:45
Dr HenDre
Avatar van Dr HenDre
Dr HenDre is offline
Citaat:
********** schreef op 06-05-2004 @ 12:41 :
Op http://php.net/file_get_contents kun je lezen waarom het niet werkt..

Maar gebruik fopen
ik zal het effe met fopen proberen, maar ben bang dat dat niet werkt omdat phpinfo() het volgende zegt:

allow_url_fopen Off

nope, fopen/fread werkt dus ook niet
PHP-code:
  $program "http://www.eter.tv/arm/programs/print_version/a_Atvsput.shtml";
  
$handle fopen($program"r");
  
$content fread($handle100000);
  
fclose($handle); 
terwijl dit lokaal perfect werkt

Laatst gewijzigd op 06-05-2004 om 11:50.
Met citaat reageren
Oud 06-05-2004, 12:07
Manuzhai
Avatar van Manuzhai
Manuzhai is offline
Zie ook je GoT topic.
__________________
Slechts beschikbaar via naamzoek/privebericht.
Met citaat reageren
Oud 06-05-2004, 12:45
Dr HenDre
Avatar van Dr HenDre
Dr HenDre is offline
Citaat:
Manuzhai schreef op 06-05-2004 @ 13:07 :
Zie ook je GoT topic.
zie reply daar
fsockopen is een van de functies die disabled is
Met citaat reageren
Oud 06-05-2004, 14:04
Orion
Avatar van Orion
Orion is offline
met file() en implode()

mag dat wel?

PHP-code:
<?php
$program 
"http://www.eter.tv/arm/programs/print_version/a_Atvsput.shtml";  
$content =  implode(""file($program)); 
?>
__________________
Ongefilterd. Van nature troebel.
Met citaat reageren
Oud 06-05-2004, 15:59
Dr HenDre
Avatar van Dr HenDre
Dr HenDre is offline
Citaat:
Orion schreef op 06-05-2004 @ 15:04 :
met file() en implode()

mag dat wel?

PHP-code:
<?php
$program 
"http://www.eter.tv/arm/programs/print_version/a_Atvsput.shtml";  
$content =  implode(""file($program)); 
?>
nope, ook dát werkt niet

op Got kwam iemand met het idee om sockets te gebruiken (socket_create, socket_connect enz). Maar dat is denk ik de laatste oplossing. Iemand hier nog een idee?
Met citaat reageren
Oud 06-05-2004, 16:07
Enlightenment
Avatar van Enlightenment
Enlightenment is offline
Ja duh dat soort prut schakelen ze uit natuurlijk. Gratis PHP is natuurlijk béétje discutabel, want ze spijkeren dat ding echt wel dicht.

Nee, beter betaal je paar euro per maand als je goede hosting wilt. Of je moet zelf hosten, dat kan ook prima als je 1Mbps upstream hebt.
__________________
Per undas adversas (tegen de stroom in)
Met citaat reageren
Oud 06-05-2004, 16:59
Dr HenDre
Avatar van Dr HenDre
Dr HenDre is offline
Citaat:
Enlightenment schreef op 06-05-2004 @ 17:07 :
Ja duh dat soort prut schakelen ze uit natuurlijk. Gratis PHP is natuurlijk béétje discutabel, want ze spijkeren dat ding echt wel dicht.

Nee, beter betaal je paar euro per maand als je goede hosting wilt. Of je moet zelf hosten, dat kan ook prima als je 1Mbps upstream hebt.
hmm, het gaat dus om max 10 pageviews per week. Het is een tv programma waarvan de tijden zoveel uur vooruit of achteruit worden gezet. En degene die hiervan af zullen weten dat zijn hoogstens 3 of 4 mensen.

Kan iemand de 2 bestandjes voor me hosten ?
dit is de code mocht je me aan een hosting willen helpen
PHP-code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<!-- Creation Date: <?=Date("d/m/Y")?> -->
<head>

<meta name="Generator" content="Dev-PHP 1.9.4">
<title>Document Title</title>

<SCRIPT LANGUAGE="JavaScript">
<!--
  function formHandler()
  {
    var URL = document.form.site.options[document.form.site.selectedIndex].value;
    window.location.href = URL;
  }
-->
</SCRIPT>

</head>
<body>
<FORM name = "form">
<SELECT NAME="site" SIZE=1 onChange ="formHandler()">
<OPTION VALUE="" selected>Kies uw tijdzone...
<OPTION VALUE="index.php?gmt=-12">GMT -12 Eniwetok, Kwajalein
<OPTION VALUE="index.php?gmt=-11">GMT -11 Midway Island, Samoa
<OPTION VALUE="index.php?gmt=-10">GMT -10 Hawaii
<OPTION VALUE="index.php?gmt=-9">GMT -9 &nbsp;Alaska
<OPTION VALUE="index.php?gmt=-8">GMT -8 &nbsp;Pacific Time (US & Canada)
<OPTION VALUE="index.php?gmt=-7">GMT -7 &nbsp;Arizona, Mountain Time (US & Canada)
<OPTION VALUE="index.php?gmt=-6">GMT -6 &nbsp;Centraal-Amerika, Central Time (US & Canada), Mexico Stad
<OPTION VALUE="index.php?gmt=-5">GMT -5 &nbsp;Bogot, Lima, Quito, Eastern Time (US & Canda)
<OPTION VALUE="index.php?gmt=-4">GMT -4 &nbsp;Atlantic Time (Canada), Carcas, La Paz, Santiago
<OPTION VALUE="index.php?gmt=-3">GMT -3 &nbsp;Brasilia, Buenos Aires, Georgetown, Groenland
<OPTION VALUE="index.php?gmt=-2">GMT -2 &nbsp;Mid-Atlantic
<OPTION VALUE="index.php?gmt=-1">GMT -1 &nbsp;Azoren
<OPTION VALUE="index.php?gmt=0">GMT &nbsp;&nbsp;&nbsp;&nbsp;Casablance, Dublin, Edinburgh, Lissabon, Londen
<OPTION VALUE="index.php?gmt=1">GMT +1  Amsterdam, Berlijn, Bern, Rome, Stockholm, Brussel, Parijs
<OPTION VALUE="index.php?gmt=2">GMT +2  Athene, Istanboel, Minsk, Boekarest, Cairo, Helsinki, Jeruzalem
<OPTION VALUE="index.php?gmt=3">GMT +3  Bagdad, Koeweit, Moskou, St. Petersburg, Tehran
<OPTION VALUE="index.php?gmt=4">GMT +4  Bakoe, Tiflis, Yerevan, Muscat, Kaboel
<OPTION VALUE="index.php?gmt=5">GMT +5  Ekatinburg, Islamabad, Karachi, Calcutta
<OPTION VALUE="index.php?gmt=6">GMT +6  Almathy, Novosibirsk
<OPTION VALUE="index.php?gmt=7">GMT +7  Bankok, Jakarta, Krasnoyarsk
<OPTION VALUE="index.php?gmt=8">GMT +8  Bejing, Hong Kong, Kula Lumpur, Singapore, Taiwan
<OPTION VALUE="index.php?gmt=9">GMT +9  Tokio, Seoul, Darwin
<OPTION VALUE="index.php?gmt=10">GMT +10 Melbourne, Sydney, Canberra
<OPTION VALUE="index.php?gmt=11">GMT +11 Magadan, Solomon Island
<OPTION VALUE="index.php?gmt=12">GMT +12 Auckland, Wellington
</SELECT>
</FORM>
<?php

  
//set GMT +1 if param gmt is not enterd or invalid
  
if(!isset($_GET['gmt']) || !is_numeric($_GET['gmt']))
    
$gmt_x 1;
  elseif(isset(
$_GET['gmt']) && is_numeric($_GET['gmt']))
    
$gmt_x $_GET['gmt'];

  
//connect to site and read content
  
$program "http://www.eter.tv/arm/programs/print_version/a_Atvsput.shtml";
  
$content =  file_get_contents($program);

  
//replace local linked images by aboslute images
  
$content str_replace("/selectprogram/images/printer.gif""http://www.eter.tv/selectprogram/images/printer.gif"$content);
  
$content str_replace("/selectprogram/images/folder.gif""http://www.eter.tv/selectprogram/images/folder.gif"$content);

  
//adjust the time
  
function add_x_hours($match)
  {
    global 
$gmt_x;
    
$match[1] += $gmt_x 4//-4 to get GMT time
    
$match[1] %= 24//modulo 24 to avoid hours > 24
    
if($match[1] < 0)
      
$match[1] = 24 abs($match[1]);
    
$tijd $match[1].".".$match[2]; //melt hours with minutes
    
return $tijd;
  }
  
//regex pattern
  
$pattern "|(\d{2}).(\d{2})[ ](<\/font>)|";
  echo 
preg_replace_callback($pattern"add_x_hours"$content);
  
  echo 
"<font face=\"Verdana, Arial, Helvetica, sans-serif\" size=1>
        <br />Time adjustments implented by <a href=\"mailto:drhendre@hotmail.com\">Henri Hambarsumyan</a></font>"
;
?>

</body>
</html>
Met citaat reageren
Oud 06-05-2004, 19:20
Marcus
Marcus is offline
Citaat:
Dr HenDre schreef op 06-05-2004 @ 17:59 :
hmm, het gaat dus om max 10 pageviews per week. Het is een tv programma waarvan de tijden zoveel uur vooruit of achteruit worden gezet. En degene die hiervan af zullen weten dat zijn hoogstens 3 of 4 mensen.

Kan iemand de 2 bestandjes voor me hosten ?
dit is de code mocht je me aan een hosting willen helpen
PHP-code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<!-- Creation Date: <?=Date("d/m/Y")?> -->
<head>

<meta name="Generator" content="Dev-PHP 1.9.4">
<title>Document Title</title>

<SCRIPT LANGUAGE="JavaScript">
<!--
  function formHandler()
  {
    var URL = document.form.site.options[document.form.site.selectedIndex].value;
    window.location.href = URL;
  }
-->
</SCRIPT>

</head>
<body>
<FORM name = "form">
<SELECT NAME="site" SIZE=1 onChange ="formHandler()">
<OPTION VALUE="" selected>Kies uw tijdzone...
<OPTION VALUE="index.php?gmt=-12">GMT -12 Eniwetok, Kwajalein
<OPTION VALUE="index.php?gmt=-11">GMT -11 Midway Island, Samoa
<OPTION VALUE="index.php?gmt=-10">GMT -10 Hawaii
<OPTION VALUE="index.php?gmt=-9">GMT -9 &nbsp;Alaska
<OPTION VALUE="index.php?gmt=-8">GMT -8 &nbsp;Pacific Time (US & Canada)
<OPTION VALUE="index.php?gmt=-7">GMT -7 &nbsp;Arizona, Mountain Time (US & Canada)
<OPTION VALUE="index.php?gmt=-6">GMT -6 &nbsp;Centraal-Amerika, Central Time (US & Canada), Mexico Stad
<OPTION VALUE="index.php?gmt=-5">GMT -5 &nbsp;Bogot, Lima, Quito, Eastern Time (US & Canda)
<OPTION VALUE="index.php?gmt=-4">GMT -4 &nbsp;Atlantic Time (Canada), Carcas, La Paz, Santiago
<OPTION VALUE="index.php?gmt=-3">GMT -3 &nbsp;Brasilia, Buenos Aires, Georgetown, Groenland
<OPTION VALUE="index.php?gmt=-2">GMT -2 &nbsp;Mid-Atlantic
<OPTION VALUE="index.php?gmt=-1">GMT -1 &nbsp;Azoren
<OPTION VALUE="index.php?gmt=0">GMT &nbsp;&nbsp;&nbsp;&nbsp;Casablance, Dublin, Edinburgh, Lissabon, Londen
<OPTION VALUE="index.php?gmt=1">GMT +1  Amsterdam, Berlijn, Bern, Rome, Stockholm, Brussel, Parijs
<OPTION VALUE="index.php?gmt=2">GMT +2  Athene, Istanboel, Minsk, Boekarest, Cairo, Helsinki, Jeruzalem
<OPTION VALUE="index.php?gmt=3">GMT +3  Bagdad, Koeweit, Moskou, St. Petersburg, Tehran
<OPTION VALUE="index.php?gmt=4">GMT +4  Bakoe, Tiflis, Yerevan, Muscat, Kaboel
<OPTION VALUE="index.php?gmt=5">GMT +5  Ekatinburg, Islamabad, Karachi, Calcutta
<OPTION VALUE="index.php?gmt=6">GMT +6  Almathy, Novosibirsk
<OPTION VALUE="index.php?gmt=7">GMT +7  Bankok, Jakarta, Krasnoyarsk
<OPTION VALUE="index.php?gmt=8">GMT +8  Bejing, Hong Kong, Kula Lumpur, Singapore, Taiwan
<OPTION VALUE="index.php?gmt=9">GMT +9  Tokio, Seoul, Darwin
<OPTION VALUE="index.php?gmt=10">GMT +10 Melbourne, Sydney, Canberra
<OPTION VALUE="index.php?gmt=11">GMT +11 Magadan, Solomon Island
<OPTION VALUE="index.php?gmt=12">GMT +12 Auckland, Wellington
</SELECT>
</FORM>
<?php

  
//set GMT +1 if param gmt is not enterd or invalid
  
if(!isset($_GET['gmt']) || !is_numeric($_GET['gmt']))
    
$gmt_x 1;
  elseif(isset(
$_GET['gmt']) && is_numeric($_GET['gmt']))
    
$gmt_x $_GET['gmt'];

  
//connect to site and read content
  
$program "http://www.eter.tv/arm/programs/print_version/a_Atvsput.shtml";
  
$content =  file_get_contents($program);

  
//replace local linked images by aboslute images
  
$content str_replace("/selectprogram/images/printer.gif""http://www.eter.tv/selectprogram/images/printer.gif"$content);
  
$content str_replace("/selectprogram/images/folder.gif""http://www.eter.tv/selectprogram/images/folder.gif"$content);

  
//adjust the time
  
function add_x_hours($match)
  {
    global 
$gmt_x;
    
$match[1] += $gmt_x 4//-4 to get GMT time
    
$match[1] %= 24//modulo 24 to avoid hours > 24
    
if($match[1] < 0)
      
$match[1] = 24 abs($match[1]);
    
$tijd $match[1].".".$match[2]; //melt hours with minutes
    
return $tijd;
  }
  
//regex pattern
  
$pattern "|(\d{2}).(\d{2})[ ](<\/font>)|";
  echo 
preg_replace_callback($pattern"add_x_hours"$content);
  
  echo 
"<font face=\"Verdana, Arial, Helvetica, sans-serif\" size=1>
        <br />Time adjustments implented by <a href=\"mailto:drhendre@hotmail.com\">Henri Hambarsumyan</a></font>"
;
?>

</body>
</html>
Ik heb webspace genoeg, continu beschikbaar, laat maar weten wat je online moet hebben
__________________
Wat een kut-topic...
Met citaat reageren
Oud 06-05-2004, 20:48
Enlightenment
Avatar van Enlightenment
Enlightenment is offline
Als DJ Mark het wilt doen...

Mocht dat niet lukken, kan ik wel wat voor je regelen.
__________________
Per undas adversas (tegen de stroom in)
Met citaat reageren
Oud 06-05-2004, 20:54
Marcus
Marcus is offline
Ze staan inmiddels online
__________________
Wat een kut-topic...
Met citaat reageren
Oud 06-05-2004, 21:53
Dr HenDre
Avatar van Dr HenDre
Dr HenDre is offline
jep, maar 1 probleem

ik gebruik niet de latijnse alphabet maar voor de ene de cyrillische(russisch) en voor de andere de armeens.
Nu werkt de armeense wel goed, zowel op mijn bak als op dei van dj mark maar russisch werkt bij mij wel goed terwijl precies hetzelfde op zijn server gezet niet werkt. Rara hoe kan dit
Met citaat reageren
Oud 06-05-2004, 23:05
Marcus
Marcus is offline
Ik zal ze eens op een andere webserver zetten, die ook php ondersteunt. Misschien ligt het aan mijn host? Ik zet ze wel even online en dan zien we wel.

- edit -

Kijk hier eens, ze staan hier online op een andere webserver
__________________
Wat een kut-topic...

Laatst gewijzigd op 07-05-2004 om 01:16.
Met citaat reageren
Oud 07-05-2004, 09:32
Dr HenDre
Avatar van Dr HenDre
Dr HenDre is offline
Citaat:
Dj Mark schreef op 07-05-2004 @ 00:05 :
Ik zal ze eens op een andere webserver zetten, die ook php ondersteunt. Misschien ligt het aan mijn host? Ik zet ze wel even online en dan zien we wel.

- edit -

Kijk hier eens, ze staan hier online op een andere webserver
uhu, dit ownt!!!!!!!!!!!!!

owww, wat ben ik je dankbaar *buigt*
Met citaat reageren
Oud 07-05-2004, 15:08
Enlightenment
Avatar van Enlightenment
Enlightenment is offline
Charming die blokjes in Firefox.
__________________
Per undas adversas (tegen de stroom in)
Met citaat reageren
Oud 07-05-2004, 15:34
Dr HenDre
Avatar van Dr HenDre
Dr HenDre is offline
Citaat:
Enlightenment schreef op 07-05-2004 @ 16:08 :
Charming die blokjes in Firefox.
mjuh, watch

Met citaat reageren
Oud 07-05-2004, 15:51
Enlightenment
Avatar van Enlightenment
Enlightenment is offline
Toch niet de agenda van een Armeense dutroux he? Ik word er niet veel wijzer van iig.
__________________
Per undas adversas (tegen de stroom in)
Met citaat reageren
Oud 07-05-2004, 16:14
Dr HenDre
Avatar van Dr HenDre
Dr HenDre is offline
Citaat:
Enlightenment schreef op 07-05-2004 @ 16:51 :
Toch niet de agenda van een Armeense dutroux he? Ik word er niet veel wijzer van iig.
neuh, tv programma's
Met citaat reageren
Oud 07-05-2004, 16:22
Enlightenment
Avatar van Enlightenment
Enlightenment is offline
Citaat:
Dr HenDre schreef op 07-05-2004 @ 17:14 :
neuh, tv programma's
Jaaaja, dutroux had ook allemaal 'tekenfilms' op z'n videobanden staan hè..
__________________
Per undas adversas (tegen de stroom in)
Met citaat reageren
Oud 07-05-2004, 17:57
Marcus
Marcus is offline
Citaat:
Dr HenDre schreef op 07-05-2004 @ 10:32 :
uhu, dit ownt!!!!!!!!!!!!!

owww, wat ben ik je dankbaar *buigt*
Goh wat ben ik weer aardig vandaag
__________________
Wat een kut-topic...
Met citaat reageren
Oud 07-05-2004, 18:21
Dr HenDre
Avatar van Dr HenDre
Dr HenDre is offline
Citaat:
Enlightenment schreef op 07-05-2004 @ 17:22 :
Jaaaja, dutroux had ook allemaal 'tekenfilms' op z'n videobanden staan hè..
LOL, denk je echt dat dat zoiets is
Met citaat reageren
Oud 07-05-2004, 18:22
Dr HenDre
Avatar van Dr HenDre
Dr HenDre is offline
Citaat:
Dj Mark schreef op 07-05-2004 @ 18:57 :
Goh wat ben ik weer aardig vandaag
Met citaat reageren
Advertentie
Reageren


Regels voor berichten
Je mag geen nieuwe topics starten
Je mag niet reageren op berichten
Je mag geen bijlagen versturen
Je mag niet je berichten bewerken

BB code is Aan
Smileys zijn Aan
[IMG]-code is Aan
HTML-code is Uit

Spring naar


Alle tijden zijn GMT +1. Het is nu 15:37.