Jump to content

westman

Members
  • Posts

    600
  • Joined

  • Last visited

Posts posted by westman

  1. hi all

    I have an error on my site and I don't know how to fix it or why it's there

     

    It happens every now and then when I am surfing my site.

     

    Google chrome give me this:

    No data received
    Unable to load the web page because the server sent no data.
    Error code: ERR_EMPTY_RESPONSE

    Any help?

  2. hi all,

    I am using file_exists not for files but to see if a folder exists

    here is my code...

     

    if (file_exists("../$folder_name")) {$mes = 'here';}else{$mes = 'not here';}

    again I am looking for folders and my code is not working, any help?

     

  3. I do not know the prices of domains. I just know if they are available or not.

    What I am asking is how do I find out (by using PHP) witch name costs more and witch ones are cheaper.

  4. for example when you buy a normal domain from godady.com its about 15-30USD but some names cost over 1,000USD because they are premium names.

     

    how do i get my PHP to find the (price) difference?

  5. Hi all

    I have a php domain checker script and it works fine...

    <?phpif($_POST['proses']){	//$domain_name_show = $_POST['domain'];	//$domain_suffix_show = $_POST['suffix'];    $nama_domain = "$_POST[domain]"."$_POST[suffix]";    $arrHost = @gethostbynamel("$nama_domain");      if(empty($arrHost)){        echo "Domain $nama_domain is available, price unknown.";    }else{        echo "Domain $nama_domain is not available.";    }}?>

    I would like it to check non premium domains only so I am not selling a domain for $15 that costs me over $1,000.

    How do I do that?

  6. ok, so i can use in php

    $item_name = str_replace("'", "", $item_name);or$item_name = str_replace(""", "", $item_name);

    depending on my javascript format (thanks justsomeguy)

     

    how do I remove a line break from a string in php?

  7. for example if you pass a line break through javascript, it does not work

     

    so is there any more code or symbols that will stop it working?

  8. hi all,

    if I am passing information from php to javascript to print on the page using something like..

     

    javascript:edit_item_link1(''.$item_name.'');

     

    what code of symbols will stop my javascript from working?

  9. one last think...My .value is not working

    function edit_item_pic1(itemid) {var theitemid = itemid; /* working *//*var theitemid1 = $("#itemid");*/out_edit_item_pic1 = document.getElementById("edit_item_pic1"); /* working */out_edit_item_pic_hidden1 = document.getElementById("edit_item_image1_hidden"); /* not working */out_edit_item_pic_hidden1.value = theitemid; /* not working *//*out_edit_item_pic_hidden1.value = theitemid1.val();*/out_edit_item_pic1.innerHTML = '<img src="../images/items/'+theitemid+'/pic1.jpg" width="200px" height="200" border="0" /><div align="center"><a href="index.php?item=remove&picitemid='+theitemid+'&pic=1">Remove</a></div>'; /* working */}

    any help?

  10. Hi all,

    I am trying to get my code to print information to the page (an image) this is what i have

     

    PHP (in while loop)

    $item_pic = '<a title="Edit" style="text-decoration:none;" href="#" onclick="return false" onmousedown="javascript:toggleSection('20'); javascript:edit_item_id('5');"><img src="' . $check_prod_pic . '" width="50px" border="0" /></a>';

    JavaScript / jQuery

    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script><script type="text/javascript">function edit_item_id(itemid) {var theitemid = itemid;out_edit_item_pic1 = document.getElementById("edit_item_pic1");out_edit_item_pic1.innerHTML = code working;/*out_edit_item_pic1.innerHTML = '<img src="../images/items/'.theitemid.'/pic1.jpg" width="200px" border="0" />';*/}</script>
    HTML
    <div id="edit_item_pic1"></div>

    it is not working,

    any help?

  11. hi all,

    I am trying to let the text in a div set the div width.

     

    I have tried...

    width: 300px;

    width:auto;

    and

    max-width: 300px;

    min-width: 300px;

     

    but it is not working.

    any help?

  12. ok people,

    I got it working with...

    $ch = curl_init();curl_setopt($ch, CURLOPT_URL,'http://mysite1.com/all/rand.php');curl_setopt($ch, CURLOPT_HEADER, false);curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);$xml_language = curl_exec($ch);curl_close($ch);echo $xml_language;

    now my last question is how do I stop people hacking me with this code and can someone explain line for line how my code works, that would be a big help for days to come.

     

    thanks in advance.

  13. hi,

    I looked up the link...

    http://davidwalsh.name/curl-download

    and man I tried for 2 days, but I just could not get my head around it

     

    so this is my code...

    mysite1.com (example code)

    <?phpinclude "../connect_to_mysql.php";$sql = mysql_query("SELECT * FROM pics WHERE size= 4 AND pictime != '0' ORDER BY RAND() LIMIT 1" );while($row = mysql_fetch_array($sql)){$picname = $row["id"];}$check_new_pic = "../images/$picname.gif";if (file_exists($check_new_pic)) {$pic = "<a href="#" target="_blank"><img src="$check_new_pic" height="300" width="200px" style="border:0;" /></a>";?><?phpecho "$pic";?>

    mysite2.com (true code)

    <?phpfunction get_data($url) {$ch = curl_init();$timeout = 5;curl_setopt($ch, CURLOPT_URL, $url);curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);$data = curl_exec($ch);curl_close($ch);return $data;}$returned_content = get_data('http://mysite1.com/all/rand.php');?>
    as you can see I am trying to get 1 random image from one site to anotherlol google does it every day with their ads, why is it so hard?
×
×
  • Create New...