I’m trying to get a remote file and force download it to user at the same time. I can’t paste the code ,the code is too long . but the curl function works ,but the problem is it doesn’t out put anything till it gets the remote file first then it force downloads it to user. I use this to
Tag: php
Operation not permitted – unlink on local machine
Im trying to unlink a folder on the local version of my site. I get the error: Any ideas how I can get unlink to work on my local machine? Im using MAMP. Answer See the documentation: unlink — Deletes a file and See Also: rmdir() – Removes directory You have a directory. You need to use rmdir, not unlin…
tempnam() not working on client server
I did a script, which has to load a file from a ftp-server then parses it. The code relies on tempname to store the temporarily store the ftp-file. On my developement server (with php 5.3.10), this works flawlessly, however on the client machine (with php 5.2.17) it does not and gives me: Can someone give me …
Delete a folder inside zip in php
I’ve a ZIP file (skins.zip) having the following structure: I need to delete folder called theme/ inside the skins.zip. I’ve tried the following code but didn’t worked. Can anyone help me, please? Answer I’ve just the following code and left the print_r output for you to understand wha…
Get coordinates from script tag, image tag, link
I’m building a search engine for deals and I put all deals on a map, so I need coordinates from websites with scraping. So, coordinates can be on scrit, tag, image, link, etc. Is there any tool or any script, framework, that help me to quick get coordinates from some web sites ? How to do that? With PHP…
PHP: move_uploaded_file() failed to open stream: No such file or directory
I’m trying to get PHP to move an uploaded file from the tmp directory to somewhere permanent on my webserver. It seems simple enough, but I’m getting this error: Unable to move ‘C:UniServertmpphp3F62.tmp’ to ‘static/images/slides/1/1.jpg’ Pretty straight-forward, right? It …
Website Scraping with PHP,Curl and MySQL Database
sorry am having bit of trouble here storing scraped content into MYSQL database. So what am trying to do is save the Module Code and Module Title from this site [http://www.ucc.ie/modules/descriptions/page014.html][1] into MYSQL database. Am able to get content from the site alright but I just cant seems to b…
Symfony 2 dynamically change form based on a selected value
I have the following table: EventType can have a few values i.e check-in, checkout, room rent, misc, etc. I want to make a form that will change the field type of “Value” to text, date, or entity based on the selected type in “EventType”. I tried to find some solutions but didn’t…
what is the difference of absolute path in html and php?
I am developing a website on php, I have installed wamp on my personal computer and my website files are in the www folder of wamp. now considering www as my root folder i have a template folder in the root folder and header.inc.html file in the template folder. when I try to include this header.inc.html file…
Adding Attributes to Select Options in Joomla
I’m trying to add extra HTML attributes to some select options in a dropdown list in Joomla 2.5, and want to use the built-in HTML helpers rather than write the HTML by myself. The current output is: …