Jump to content

westman

Members
  • Posts

    600
  • Joined

  • Last visited

Everything posted by westman

  1. westman

    dynamic div width

    I there I am trying to get 2 divs side by side filling the page. the div on the left can change width depending on content. how do i set the width of the right div? since the left div has no set width I have looked at this... http://kamlekar.wordpress.com/2013/06/28/set-dynamic-like-heightwidth-using-just-css/ but it is not dynamic for what i need
  2. westman

    site error

    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?
  3. westman

    file_exists

    I am so sorry it dose work i put 'here' and 'not here' in the wrong place again sorry
  4. westman

    file_exists

    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?
  5. westman

    php domain checker

    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.
  6. westman

    php domain checker

    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?
  7. westman

    php domain checker

    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?
  8. is a line break "n","r"?
  9. 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?
  10. 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?
  11. 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?
  12. thank you found it. it was a php problem
  13. 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?
  14. thank you so much. It is now working well again Thank you
  15. thank you Hadien "code working" is now working but how do I add that "theitemid" variable in my image?
  16. when a php picture link is clicked the javascript should run and print "code working" in my div one that works I will then try to get javascript to print a picture as the final step.
  17. 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?
  18. westman

    div width

    Dsonesuk thank you display: inline; display: inline-block; works very well
  19. westman

    div width

    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?
  20. I looked it up and understand it now but how do I stop this code been used by someone I don't know (hacker)?
  21. 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.
  22. 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?
  23. I have researched cURL but got nowhere, could you provide a link to an example that is related to what i am looking for?
  24. The code I wrote is just a simple example of my true code I have. how do I get my code working with cURL?
×
×
  • Create New...